java.lang.Object
java.lang.Record
net.minestom.server.registry.RegistryTranscoder<D>
- All Implemented Interfaces:
Transcoder<D>
,TranscoderProxy<D>
public record RegistryTranscoder<D>(Transcoder<D> transcoder, Registries registries, boolean forClient, boolean init)
extends Record
implements TranscoderProxy<D>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.codec.Transcoder
Transcoder.ListBuilder<D>, Transcoder.MapBuilder<D>, Transcoder.MapLike<D>
-
Field Summary
Fields inherited from interface net.minestom.server.codec.Transcoder
CRC32_HASH, JAVA, JSON, NBT
-
Constructor Summary
ConstructorsConstructorDescriptionRegistryTranscoder
(Transcoder<D> transcoder, Registries registries) RegistryTranscoder
(Transcoder<D> transcoder, Registries registries, boolean forClient, boolean init) Creates an instance of aRegistryTranscoder
record class. -
Method Summary
Modifier and TypeMethodDescriptiondelegate()
final boolean
Indicates whether some other object is "equal to" this one.boolean
Returns the value of theforClient
record component.final int
hashCode()
Returns a hash code value for this object.boolean
init()
Returns the value of theinit
record component.Returns the value of theregistries
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetranscoder
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minestom.server.codec.Transcoder
emptyList, emptyMap
Methods inherited from interface net.minestom.server.codec.TranscoderProxy
convertTo, createBoolean, createByte, createByteArray, createDouble, createFloat, createInt, createIntArray, createList, createLong, createLongArray, createMap, createNull, createShort, createString, getBoolean, getByte, getByteArray, getDouble, getFloat, getInt, getIntArray, getList, getLong, getLongArray, getMap, getShort, getString
-
Constructor Details
-
RegistryTranscoder
-
RegistryTranscoder
public RegistryTranscoder(Transcoder<D> transcoder, Registries registries, boolean forClient, boolean init) Creates an instance of aRegistryTranscoder
record class.- Parameters:
transcoder
- the value for thetranscoder
record componentregistries
- the value for theregistries
record componentforClient
- the value for theforClient
record componentinit
- the value for theinit
record component
-
-
Method Details
-
delegate
- Specified by:
delegate
in interfaceTranscoderProxy<D>
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
transcoder
Returns the value of thetranscoder
record component.- Returns:
- the value of the
transcoder
record component
-
registries
Returns the value of theregistries
record component.- Returns:
- the value of the
registries
record component
-
forClient
public boolean forClient()Returns the value of theforClient
record component.- Returns:
- the value of the
forClient
record component
-
init
public boolean init()Returns the value of theinit
record component.- Returns:
- the value of the
init
record component
-