Record Class InstrumentComponent
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.InstrumentComponent
public record InstrumentComponent(@Nullable Holder<InstrumentComponent.Instrument> instrumentHolder, @Nullable net.kyori.adventure.key.Key instrumentLocation)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic class -
Constructor Summary
ConstructorsConstructorDescriptionInstrumentComponent(@Nullable Holder<InstrumentComponent.Instrument> instrumentHolder, @Nullable net.kyori.adventure.key.Key instrumentLocation) Creates an instance of aInstrumentComponentrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull InstrumentComponent.InstrumentComponentBuilderbuilder()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable Holder<InstrumentComponent.Instrument>Returns the value of theinstrumentHolderrecord component.@Nullable net.kyori.adventure.key.KeyReturns the value of theinstrumentLocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InstrumentComponent
public InstrumentComponent(@Nullable @Nullable Holder<InstrumentComponent.Instrument> instrumentHolder, @Nullable @Nullable net.kyori.adventure.key.Key instrumentLocation) Creates an instance of aInstrumentComponentrecord class.- Parameters:
instrumentHolder- the value for theinstrumentHolderrecord componentinstrumentLocation- the value for theinstrumentLocationrecord component
-
-
Method Details
-
builder
-
toBuilder
-
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). -
instrumentHolder
Returns the value of theinstrumentHolderrecord component.- Returns:
- the value of the
instrumentHolderrecord component
-
instrumentLocation
@Nullable public @Nullable net.kyori.adventure.key.Key instrumentLocation()Returns the value of theinstrumentLocationrecord component.- Returns:
- the value of the
instrumentLocationrecord component
-