Record Class ItemAttribute
java.lang.Object
java.lang.Record
net.minestom.server.item.attribute.ItemAttribute
public record ItemAttribute(@NotNull UUID uuid, @NotNull String name, @NotNull Attribute attribute, @NotNull AttributeOperation operation, double amount, @NotNull AttributeSlot slot)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionItemAttribute(@NotNull UUID uuid, @NotNull String name, @NotNull Attribute attribute, @NotNull AttributeOperation operation, double amount, @NotNull AttributeSlot slot) Creates an instance of aItemAttributerecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleamount()Returns the value of theamountrecord component.@NotNull AttributeReturns the value of theattributerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull AttributeOperationReturns the value of theoperationrecord component.@NotNull AttributeSlotslot()Returns the value of theslotrecord component.final StringtoString()Returns a string representation of this record class.@NotNull UUIDuuid()Returns the value of theuuidrecord component.
-
Constructor Details
-
ItemAttribute
public ItemAttribute(@NotNull @NotNull UUID uuid, @NotNull @NotNull String name, @NotNull @NotNull Attribute attribute, @NotNull @NotNull AttributeOperation operation, double amount, @NotNull @NotNull AttributeSlot slot) Creates an instance of aItemAttributerecord class.- Parameters:
uuid- the value for theuuidrecord componentname- the value for thenamerecord componentattribute- the value for theattributerecord componentoperation- the value for theoperationrecord componentamount- the value for theamountrecord componentslot- the value for theslotrecord 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 '=='. -
uuid
Returns the value of theuuidrecord component.- Returns:
- the value of the
uuidrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
attribute
Returns the value of theattributerecord component.- Returns:
- the value of the
attributerecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
amount
public double amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-
slot
Returns the value of theslotrecord component.- Returns:
- the value of the
slotrecord component
-