Package net.lenni0451.imnbt.utils.nbt
Record Class NbtReader.ReadResult
java.lang.Object
java.lang.Record
net.lenni0451.imnbt.utils.nbt.NbtReader.ReadResult
- Enclosing class:
- NbtReader
public static record NbtReader.ReadResult(Optional<net.lenni0451.mcstructs.nbt.io.NamedTag> namedTag, ICustomFormat customFormat, int unreadBytes)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionReadResult(Optional<net.lenni0451.mcstructs.nbt.io.NamedTag> namedTag, ICustomFormat customFormat, int unreadBytes) Creates an instance of aReadResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomFormatrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<net.lenni0451.mcstructs.nbt.io.NamedTag>namedTag()Returns the value of thenamedTagrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theunreadBytesrecord component.
-
Constructor Details
-
ReadResult
public ReadResult(Optional<net.lenni0451.mcstructs.nbt.io.NamedTag> namedTag, ICustomFormat customFormat, int unreadBytes) Creates an instance of aReadResultrecord class.- Parameters:
namedTag- the value for thenamedTagrecord componentcustomFormat- the value for thecustomFormatrecord componentunreadBytes- the value for theunreadBytesrecord component
-
-
Method Details
-
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 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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
namedTag
Returns the value of thenamedTagrecord component.- Returns:
- the value of the
namedTagrecord component
-
customFormat
Returns the value of thecustomFormatrecord component.- Returns:
- the value of the
customFormatrecord component
-
unreadBytes
public int unreadBytes()Returns the value of theunreadBytesrecord component.- Returns:
- the value of the
unreadBytesrecord component
-