Record Class ModalAbility
java.lang.Object
java.lang.Record
org.magic.api.ast.abilities.ModalAbility
- All Implemented Interfaces:
AbilityNode
public record ModalAbility(ChoiceConstraint choiceConstraint, List<ModeNode> modes)
extends Record
implements AbilityNode
-
Constructor Summary
ConstructorsConstructorDescriptionModalAbility(ChoiceConstraint choiceConstraint, List<ModeNode> modes) Creates an instance of aModalAbilityrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechoiceConstraintrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modes()Returns the value of themodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModalAbility
Creates an instance of aModalAbilityrecord class.- Parameters:
choiceConstraint- the value for thechoiceConstraintrecord componentmodes- the value for themodesrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
choiceConstraint
Returns the value of thechoiceConstraintrecord component.- Returns:
- the value of the
choiceConstraintrecord component
-
modes
-