Record Class ResourceExtractionMultiplier
java.lang.Object
java.lang.Record
idlab.colonyops.model.techtree.ResourceExtractionMultiplier
- Record Components:
resourceType- the resource type this multiplier applies tomultiplier- the factor applied to the extraction rate
- All Implemented Interfaces:
TechEffect
public record ResourceExtractionMultiplier(ResourceType resourceType, double multiplier)
extends Record
implements TechEffect
Multiplies the amount extracted per turn for a specific resource type.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceExtractionMultiplier(ResourceType resourceType, double multiplier) Creates an instance of aResourceExtractionMultiplierrecord 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.Returns the value of theresourceTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResourceExtractionMultiplier
Creates an instance of aResourceExtractionMultiplierrecord class.- Parameters:
resourceType- the value for theresourceTyperecord 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. -
resourceType
Returns the value of theresourceTyperecord component.- Returns:
- the value of the
resourceTyperecord component
-
multiplier
public double multiplier()Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-