Record Class AttackAction
java.lang.Object
java.lang.Record
idlab.colonyops.model.actions.AttackAction
- Record Components:
targetLocation- the location of the entity to attacktargetEntityId- the identifier of the entity to attack
- All Implemented Interfaces:
Action
-
Constructor Summary
ConstructorsConstructorDescriptionAttackAction(Location targetLocation, String targetEntityId) Creates an instance of aAttackActionrecord 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.Returns the value of thetargetEntityIdrecord component.Returns the value of thetargetLocationrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AttackAction
Creates an instance of aAttackActionrecord class.- Parameters:
targetLocation- the value for thetargetLocationrecord componenttargetEntityId- the value for thetargetEntityIdrecord 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). -
targetLocation
Returns the value of thetargetLocationrecord component.- Returns:
- the value of the
targetLocationrecord component
-
targetEntityId
Returns the value of thetargetEntityIdrecord component.- Returns:
- the value of the
targetEntityIdrecord component
-