Record Class RegistryTranscoder<D>

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>
  • Constructor Details

    • RegistryTranscoder

      public RegistryTranscoder(Transcoder<D> transcoder, Registries registries)
    • RegistryTranscoder

      public RegistryTranscoder(Transcoder<D> transcoder, Registries registries, boolean forClient, boolean init)
      Creates an instance of a RegistryTranscoder record class.
      Parameters:
      transcoder - the value for the transcoder record component
      registries - the value for the registries record component
      forClient - the value for the forClient record component
      init - the value for the init record component
  • Method Details

    • delegate

      public Transcoder<D> delegate()
      Specified by:
      delegate in interface TranscoderProxy<D>
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • transcoder

      public Transcoder<D> transcoder()
      Returns the value of the transcoder record component.
      Returns:
      the value of the transcoder record component
    • registries

      public Registries registries()
      Returns the value of the registries record component.
      Returns:
      the value of the registries record component
    • forClient

      public boolean forClient()
      Returns the value of the forClient record component.
      Returns:
      the value of the forClient record component
    • init

      public boolean init()
      Returns the value of the init record component.
      Returns:
      the value of the init record component