Record Class Hex64

java.lang.Object
java.lang.Record
dev.latvian.mods.klib.util.Hex64

public record Hex64(long raw) extends Record
  • Field Details

    • NONE

      public static final Hex64 NONE
    • STRING_CODEC

      public static final com.mojang.serialization.Codec<Hex64> STRING_CODEC
    • LONG_CODEC

      public static final com.mojang.serialization.Codec<Hex64> LONG_CODEC
    • CODEC

      public static final com.mojang.serialization.Codec<Hex64> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf, Hex64> STREAM_CODEC
    • DATA_TYPE

      public static final DataType<Hex64> DATA_TYPE
  • Constructor Details

    • Hex64

      public Hex64(long raw)
      Creates an instance of a Hex64 record class.
      Parameters:
      raw - the value for the raw record component
  • Method Details

    • of

      public static Hex64 of(long id)
    • of

      public static Hex64 of(String id)
    • hashCode

      public 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 boolean equals(Object obj)
      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. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      obj - the object with which to compare
      Returns:
      true if this object is the same as the obj argument; false otherwise.
    • toString

      @NotNull public @NotNull 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
    • getMostSignificantBits

      public int getMostSignificantBits()
    • getLeastSignificantBits

      public int getLeastSignificantBits()
    • raw

      public long raw()
      Returns the value of the raw record component.
      Returns:
      the value of the raw record component