Record Class Consumable
java.lang.Object
java.lang.Record
idlab.colonyops.model.entities.inventory.Consumable
- Record Components:
type- the effect this consumable grantsturnsLeft- turns remaining before the effect expires
An active consumable effect on a
SquadMember. A member
can have at most one active consumable at a time; deploying a new one replaces the current
one.-
Constructor Summary
ConstructorsConstructorDescriptionConsumable(ConsumableType type, int turnsLeft) Creates an instance of aConsumablerecord 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.final StringtoString()Returns a string representation of this record class.intReturns the value of theturnsLeftrecord component.type()Returns the value of thetyperecord component.
-
Constructor Details
-
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. -
type
-
turnsLeft
-