Package dev.latvian.mods.klib.util
Record Class MD5
java.lang.Object
java.lang.Record
dev.latvian.mods.klib.util.MD5
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]bytes()Returns the value of thebytesrecord component.booleanIndicates whether some other object is "equal to" this one.static MD5fromBytes(byte[] bytes) static MD5fromString(String string) inthashCode()Returns a hash code value for this object.booleanisEmpty()static MD5string()Returns the value of thestringrecord component.@NotNull StringtoString()Returns a string representation of this record class.voidwrite(DataOutput data)
-
Field Details
-
NIL
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<io.netty.buffer.ByteBuf,MD5> STREAM_CODEC -
DATA_TYPE
-
-
Constructor Details
-
MD5
Creates an instance of aMD5record class.- Parameters:
bytes- the value for thebytesrecord componentstring- the value for thestringrecord component
-
-
Method Details
-
fromBytes
-
fromString
-
read
- Throws:
IOException
-
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 withObjects::equals(Object,Object). -
isEmpty
public boolean isEmpty() -
write
- Throws:
IOException
-
bytes
public byte[] bytes()Returns the value of thebytesrecord component.- Returns:
- the value of the
bytesrecord component
-
string
Returns the value of thestringrecord component.- Returns:
- the value of the
stringrecord component
-