Record Class SHA384

java.lang.Object
java.lang.Record
dev.latvian.mods.klib.io.checksum.SHA384
All Implemented Interfaces:
Checksum

public record SHA384(long a, long b, long c, long d, long e, long f) extends Record implements Checksum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final com.mojang.serialization.Codec<SHA384>
     
    static final DataType<SHA384>
     
    static final SHA384
     
    static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,SHA384>
     
    static final ChecksumType<SHA384>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    SHA384(long a, long b, long c, long d, long e, long f)
    Creates an instance of a SHA384 record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    a()
    Returns the value of the a record component.
    long
    b()
    Returns the value of the b record component.
    long
    c()
    Returns the value of the c record component.
    long
    d()
    Returns the value of the d record component.
    long
    e()
    Returns the value of the e record component.
    void
    encode(io.netty.buffer.ByteBuf buf)
     
    boolean
    Indicates whether some other object is "equal to" this one.
    long
    f()
    Returns the value of the f record component.
    int
    Returns a hash code value for this object.
    boolean
     
    static SHA384
    of(byte[] bytes)
     
    static SHA384
    of(long a, long b, long c, long d, long e, long f)
     
    byte[]
     
    @NotNull String
    Returns a string representation of this record class.
     
    void
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface dev.latvian.mods.klib.io.checksum.Checksum

    writeFully
  • Field Details

    • NIL

      public static final SHA384 NIL
    • TYPE

      public static final ChecksumType<SHA384> TYPE
    • CODEC

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

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

      public static final DataType<SHA384> DATA_TYPE
  • Constructor Details

    • SHA384

      public SHA384(long a, long b, long c, long d, long e, long f)
      Creates an instance of a SHA384 record class.
      Parameters:
      a - the value for the a record component
      b - the value for the b record component
      c - the value for the c record component
      d - the value for the d record component
      e - the value for the e record component
      f - the value for the f record component
  • Method Details

    • of

      public static SHA384 of(long a, long b, long c, long d, long e, long f)
    • of

      public static SHA384 of(byte[] bytes)
    • type

      public ChecksumType<SHA384> type()
      Specified by:
      type in interface Checksum
    • 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
    • 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 '=='.
      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.
    • isNil

      public boolean isNil()
      Specified by:
      isNil in interface Checksum
    • toByteArray

      public byte[] toByteArray()
      Specified by:
      toByteArray in interface Checksum
    • write

      public void write(ByteOutput data) throws IOException
      Specified by:
      write in interface Checksum
      Throws:
      IOException
    • encode

      public void encode(io.netty.buffer.ByteBuf buf)
      Specified by:
      encode in interface Checksum
    • a

      public long a()
      Returns the value of the a record component.
      Returns:
      the value of the a record component
    • b

      public long b()
      Returns the value of the b record component.
      Returns:
      the value of the b record component
    • c

      public long c()
      Returns the value of the c record component.
      Returns:
      the value of the c record component
    • d

      public long d()
      Returns the value of the d record component.
      Returns:
      the value of the d record component
    • e

      public long e()
      Returns the value of the e record component.
      Returns:
      the value of the e record component
    • f

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