Record Class CreateTokenEffect
java.lang.Object
java.lang.Record
org.magic.api.ast.effects.CreateTokenEffect
- All Implemented Interfaces:
EffectNode
public record CreateTokenEffect(String tokenDescription, int quantity)
extends Record
implements EffectNode
-
Constructor Summary
ConstructorsConstructorDescriptionCreateTokenEffect(String tokenDescription, int quantity) Creates an instance of aCreateTokenEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intquantity()Returns the value of thequantityrecord component.Returns the value of thetokenDescriptionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CreateTokenEffect
Creates an instance of aCreateTokenEffectrecord class.- Parameters:
tokenDescription- the value for thetokenDescriptionrecord componentquantity- the value for thequantityrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
tokenDescription
Returns the value of thetokenDescriptionrecord component.- Returns:
- the value of the
tokenDescriptionrecord component
-
quantity
public int quantity()Returns the value of thequantityrecord component.- Returns:
- the value of the
quantityrecord component
-