Record Class WeaponDamageMultiplier
java.lang.Object
java.lang.Record
idlab.colonyops.model.techtree.WeaponDamageMultiplier
- Record Components:
weaponType- the weapon type this multiplier applies tomultiplier- the factor applied to the weapon's damage
- All Implemented Interfaces:
TechEffect
public record WeaponDamageMultiplier(WeaponType weaponType, double multiplier)
extends Record
implements TechEffect
Multiplies the damage dealt by a specific weapon type.
-
Constructor Summary
ConstructorsConstructorDescriptionWeaponDamageMultiplier(WeaponType weaponType, double multiplier) Creates an instance of aWeaponDamageMultiplierrecord 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.doubleReturns the value of themultiplierrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theweaponTyperecord component.
-
Constructor Details
-
WeaponDamageMultiplier
Creates an instance of aWeaponDamageMultiplierrecord class.- Parameters:
weaponType- the value for theweaponTyperecord componentmultiplier- the value for themultiplierrecord 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
-
multiplier
public double multiplier()Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-