Record Class ResearchTargets
java.lang.Object
java.lang.Record
idlab.colonyops.model.strategy.ResearchTargets
- Record Components:
economicResearchTarget- the leaf node id chosen in the economic tech treemilitaryResearchTarget- the leaf node id chosen in the military tech tree
public record ResearchTargets(String economicResearchTarget, String militaryResearchTarget)
extends Record
The chosen research branch in each tech tree, identified by the
id of a leaf node.
Changing a target to a different leaf resets that tree's research depth: effects from the old
branch are lost in favour of the new one.-
Constructor Summary
ConstructorsConstructorDescriptionResearchTargets(String economicResearchTarget, String militaryResearchTarget) Creates an instance of aResearchTargetsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theeconomicResearchTargetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themilitaryResearchTargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResearchTargets
Creates an instance of aResearchTargetsrecord class.- Parameters:
economicResearchTarget- the value for theeconomicResearchTargetrecord componentmilitaryResearchTarget- the value for themilitaryResearchTargetrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
economicResearchTarget
Returns the value of theeconomicResearchTargetrecord component.- Returns:
- the value of the
economicResearchTargetrecord component
-
militaryResearchTarget
Returns the value of themilitaryResearchTargetrecord component.- Returns:
- the value of the
militaryResearchTargetrecord component
-