Record Class SHA512
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.io.checksum.SHA512
- All Implemented Interfaces:
Checksum
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSHA512(long a, long b, long c, long d, long e, long f, long g, long h) Creates an instance of aSHA512record class. -
Method Summary
Modifier and TypeMethodDescriptionlonga()Returns the value of thearecord component.longb()Returns the value of thebrecord component.longc()Returns the value of thecrecord component.longd()Returns the value of thedrecord component.longe()Returns the value of theerecord component.voidencode(io.netty.buffer.ByteBuf buf) booleanIndicates whether some other object is "equal to" this one.longf()Returns the value of thefrecord component.longg()Returns the value of thegrecord component.longh()Returns the value of thehrecord component.inthashCode()Returns a hash code value for this object.booleanisNil()static SHA512of(byte[] bytes) static SHA512of(long a, long b, long c, long d, long e, long f, long g, long h) byte[]@NotNull StringtoString()Returns a string representation of this record class.type()voidwrite(ByteOutput data) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface dev.latvian.mods.klib.io.checksum.Checksum
writeFully
-
Field Details
-
NIL
-
TYPE
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,SHA512> STREAM_CODEC -
DATA_TYPE
-
-
Constructor Details
-
SHA512
public SHA512(long a, long b, long c, long d, long e, long f, long g, long h) Creates an instance of aSHA512record class.- Parameters:
a- the value for thearecord componentb- the value for thebrecord componentc- the value for thecrecord componentd- the value for thedrecord componente- the value for theerecord componentf- the value for thefrecord componentg- the value for thegrecord componenth- the value for thehrecord component
-
-
Method Details
-
of
-
of
-
type
-
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 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. All components in this record class are compared with '=='. -
isNil
public boolean isNil() -
toByteArray
public byte[] toByteArray()- Specified by:
toByteArrayin interfaceChecksum
-
write
- Specified by:
writein interfaceChecksum- Throws:
IOException
-
encode
public void encode(io.netty.buffer.ByteBuf buf) -
a
public long a()Returns the value of thearecord component.- Returns:
- the value of the
arecord component
-
b
public long b()Returns the value of thebrecord component.- Returns:
- the value of the
brecord component
-
c
public long c()Returns the value of thecrecord component.- Returns:
- the value of the
crecord component
-
d
public long d()Returns the value of thedrecord component.- Returns:
- the value of the
drecord component
-
e
public long e()Returns the value of theerecord component.- Returns:
- the value of the
erecord component
-
f
public long f()Returns the value of thefrecord component.- Returns:
- the value of the
frecord component
-
g
public long g()Returns the value of thegrecord component.- Returns:
- the value of the
grecord component
-
h
public long h()Returns the value of thehrecord component.- Returns:
- the value of the
hrecord component
-