Record Class DiscardCardsEffect
java.lang.Object
java.lang.Record
org.magic.api.ast.effects.DiscardCardsEffect
- All Implemented Interfaces:
EffectNode
public record DiscardCardsEffect(TargetSelectorNode player, int amount)
extends Record
implements EffectNode
-
Constructor Summary
ConstructorsConstructorDescriptionDiscardCardsEffect(TargetSelectorNode player, int amount) Creates an instance of aDiscardCardsEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.player()Returns the value of theplayerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DiscardCardsEffect
Creates an instance of aDiscardCardsEffectrecord class.- Parameters:
player- the value for theplayerrecord componentamount- the value for theamountrecord 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. -
player
Returns the value of theplayerrecord component.- Returns:
- the value of the
playerrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-