Record Class ConsumableDurationBonus
java.lang.Object
java.lang.Record
idlab.colonyops.model.techtree.ConsumableDurationBonus
- Record Components:
consumableType- the consumable type this bonus applies tobonus- additional turns the effect remains active
- All Implemented Interfaces:
TechEffect
public record ConsumableDurationBonus(ConsumableType consumableType, int bonus)
extends Record
implements TechEffect
Extends how long a given consumable type stays active.
-
Constructor Summary
ConstructorsConstructorDescriptionConsumableDurationBonus(ConsumableType consumableType, int bonus) Creates an instance of aConsumableDurationBonusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbonus()Returns the value of thebonusrecord component.Returns the value of theconsumableTyperecord component.final 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.
-
Constructor Details
-
ConsumableDurationBonus
Creates an instance of aConsumableDurationBonusrecord class.- Parameters:
consumableType- the value for theconsumableTyperecord componentbonus- the value for thebonusrecord 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. -
consumableType
Returns the value of theconsumableTyperecord component.- Returns:
- the value of the
consumableTyperecord component
-
bonus
-