Package dev.crafty.core.items
Record Class ItemAction
java.lang.Object
java.lang.Record
dev.crafty.core.items.ItemAction
public record ItemAction(String actionId, @Nullable List<ItemActionCondition> conditions)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionItemAction
(String actionId, @Nullable List<ItemActionCondition> conditions) Creates an instance of aItemAction
record class. -
Method Summary
Modifier and TypeMethodDescriptionactionId()
Returns the value of theactionId
record component.@Nullable List
<ItemActionCondition> Returns the value of theconditions
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.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
ItemAction
Creates an instance of aItemAction
record class.- Parameters:
actionId
- the value for theactionId
record componentconditions
- the value for theconditions
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
actionId
Returns the value of theactionId
record component.- Returns:
- the value of the
actionId
record component
-
conditions
Returns the value of theconditions
record component.- Returns:
- the value of the
conditions
record component
-