Record Class SacrificeCost
java.lang.Object
java.lang.Record
org.magic.api.ast.costs.SacrificeCost
- All Implemented Interfaces:
CostNode
-
Constructor Summary
ConstructorsConstructorDescriptionSacrificeCost(TargetSelectorNode target, int qty) Creates an instance of aSacrificeCostrecord 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.intqty()Returns the value of theqtyrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SacrificeCost
Creates an instance of aSacrificeCostrecord class.- Parameters:
target- the value for thetargetrecord componentqty- the value for theqtyrecord 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. -
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
qty
public int qty()Returns the value of theqtyrecord component.- Returns:
- the value of the
qtyrecord component
-