java.lang.Object
java.lang.Record
net.minestom.server.adventure.BinaryTagHolderImpl
- All Implemented Interfaces:
BinaryTagHolder
,DataComponentValue
,DataComponentValue.TagSerializable
,net.kyori.examination.Examinable
public record BinaryTagHolderImpl(net.kyori.adventure.nbt.BinaryTag nbt)
extends Record
implements BinaryTagHolder
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.kyori.adventure.text.event.DataComponentValue
DataComponentValue.Removed, DataComponentValue.TagSerializable
-
Constructor Summary
ConstructorsConstructorDescriptionBinaryTagHolderImpl
(net.kyori.adventure.nbt.BinaryTag nbt) Creates an instance of aBinaryTagHolderImpl
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.<T,
DX extends Exception>
Tfinal int
hashCode()
Returns a hash code value for this object.net.kyori.adventure.nbt.BinaryTag
nbt()
Returns the value of thenbt
record component.string()
final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.kyori.adventure.nbt.api.BinaryTagHolder
asBinaryTag
Methods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examine
-
Constructor Details
-
BinaryTagHolderImpl
public BinaryTagHolderImpl(net.kyori.adventure.nbt.BinaryTag nbt) Creates an instance of aBinaryTagHolderImpl
record class.- Parameters:
nbt
- the value for thenbt
record component
-
-
Method Details
-
string
- Specified by:
string
in interfaceBinaryTagHolder
-
get
- Specified by:
get
in interfaceBinaryTagHolder
- Throws:
DX
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
nbt
public net.kyori.adventure.nbt.BinaryTag nbt()Returns the value of thenbt
record component.- Returns:
- the value of the
nbt
record component
-