Package net.minestom.server.adventure
Record Class BinaryTagHolderImpl
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(@NotNull 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(@NotNull net.kyori.adventure.nbt.BinaryTag nbt) Creates an instance of aBinaryTagHolderImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.<T,DX extends Exception>
Tfinal inthashCode()Returns a hash code value for this object.@NotNull net.kyori.adventure.nbt.BinaryTagnbt()Returns the value of thenbtrecord component.@NotNull Stringstring()final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.kyori.adventure.nbt.api.BinaryTagHolder
asBinaryTagMethods inherited from interface net.kyori.examination.Examinable
examinableName, examinableProperties, examine
-
Constructor Details
-
BinaryTagHolderImpl
public BinaryTagHolderImpl(@NotNull @NotNull net.kyori.adventure.nbt.BinaryTag nbt) Creates an instance of aBinaryTagHolderImplrecord class.- Parameters:
nbt- the value for thenbtrecord component
-
-
Method Details
-
string
- Specified by:
stringin interfaceBinaryTagHolder
-
get
@NotNull public <T,DX extends Exception> T get(@NotNull @NotNull Codec<T, String, throws DXDX, ?> codec) - Specified by:
getin 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
@NotNull public @NotNull net.kyori.adventure.nbt.BinaryTag nbt()Returns the value of thenbtrecord component.- Returns:
- the value of the
nbtrecord component
-