Record Class WeaponRangeBonus
java.lang.Object
java.lang.Record
idlab.colonyops.model.techtree.WeaponRangeBonus
- Record Components:
weaponType- the weapon type this bonus applies tobonus- additional range, in tiles
- All Implemented Interfaces:
TechEffect
public record WeaponRangeBonus(WeaponType weaponType, int bonus)
extends Record
implements TechEffect
Increases the range of a specific weapon type.
-
Constructor Summary
ConstructorsConstructorDescriptionWeaponRangeBonus(WeaponType weaponType, int bonus) Creates an instance of aWeaponRangeBonusrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbonus()Returns the value of thebonusrecord 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.Returns the value of theweaponTyperecord component.
-
Constructor Details
-
WeaponRangeBonus
Creates an instance of aWeaponRangeBonusrecord class.- Parameters:
weaponType- the value for theweaponTyperecord 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. -
weaponType
Returns the value of theweaponTyperecord component.- Returns:
- the value of the
weaponTyperecord component
-
bonus
-