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
ConstructorDescriptionItemAttribute
(@NotNull UUID uuid, @NotNull String name, @NotNull Attribute attribute, @NotNull AttributeOperation operation, double amount, @NotNull AttributeSlot slot) Creates an instance of aItemAttribute
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
amount()
Returns the value of theamount
record component.@NotNull Attribute
Returns the value of theattribute
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull String
name()
Returns the value of thename
record component.@NotNull AttributeOperation
Returns the value of theoperation
record component.@NotNull AttributeSlot
slot()
Returns the value of theslot
record component.final String
toString()
Returns a string representation of this record class.@NotNull UUID
uuid()
Returns the value of theuuid
record 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 aItemAttribute
record class.- Parameters:
uuid
- the value for theuuid
record componentname
- the value for thename
record componentattribute
- the value for theattribute
record componentoperation
- the value for theoperation
record componentamount
- the value for theamount
record componentslot
- the value for theslot
record 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 theuuid
record component.- Returns:
- the value of the
uuid
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
attribute
Returns the value of theattribute
record component.- Returns:
- the value of the
attribute
record component
-
operation
Returns the value of theoperation
record component.- Returns:
- the value of the
operation
record component
-
amount
public double amount()Returns the value of theamount
record component.- Returns:
- the value of the
amount
record component
-
slot
Returns the value of theslot
record component.- Returns:
- the value of the
slot
record component
-