Record Class SolverLifecyclePoint
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.phase.scope.SolverLifecyclePoint
- Record Components:
moveThreadIndex- the index of the move thread, or -1 if moveThreadCount = NONE.phaseIndex- the index of the phase.stepIndex- the index of the step.moveIndex- the index of the move, or -1 if exhaustive search.treeId- the id of the move tree if exhaustive search, null otherwise.
public record SolverLifecyclePoint(int moveThreadIndex, int phaseIndex, int stepIndex, int moveIndex, String treeId)
extends Record
Identifies which move thread, which phase, step and move/move tree the solver is currently executing.
-
Constructor Summary
ConstructorsConstructorDescriptionSolverLifecyclePoint(int moveThreadIndex, int phaseIndex, int stepIndex, int moveIndex, String treeId) Creates an instance of aSolverLifecyclePointrecord 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.intReturns the value of themoveIndexrecord component.intReturns the value of themoveThreadIndexrecord component.static SolverLifecyclePointof(int moveThreadIndex, int phaseIndex, int stepIndex, int moveIndex) static SolverLifecyclePointof(AbstractMoveScope<?> moveScope) static SolverLifecyclePointof(AbstractStepScope<?> stepScope, String treeId) intReturns the value of thephaseIndexrecord component.intReturns the value of thestepIndexrecord component.toString()Returns a string representation of this record class.treeId()Returns the value of thetreeIdrecord component.
-
Constructor Details
-
SolverLifecyclePoint
public SolverLifecyclePoint(int moveThreadIndex, int phaseIndex, int stepIndex, int moveIndex, String treeId) Creates an instance of aSolverLifecyclePointrecord class.- Parameters:
moveThreadIndex- the value for themoveThreadIndexrecord componentphaseIndex- the value for thephaseIndexrecord componentstepIndex- the value for thestepIndexrecord componentmoveIndex- the value for themoveIndexrecord componenttreeId- the value for thetreeIdrecord component
-
-
Method Details
-
of
-
of
-
of
public static SolverLifecyclePoint of(int moveThreadIndex, int phaseIndex, int stepIndex, int moveIndex) -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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 '=='. -
moveThreadIndex
public int moveThreadIndex()Returns the value of themoveThreadIndexrecord component.- Returns:
- the value of the
moveThreadIndexrecord component
-
phaseIndex
public int phaseIndex()Returns the value of thephaseIndexrecord component.- Returns:
- the value of the
phaseIndexrecord component
-
stepIndex
public int stepIndex()Returns the value of thestepIndexrecord component.- Returns:
- the value of the
stepIndexrecord component
-
moveIndex
public int moveIndex()Returns the value of themoveIndexrecord component.- Returns:
- the value of the
moveIndexrecord component
-
treeId
Returns the value of thetreeIdrecord component.- Returns:
- the value of the
treeIdrecord component
-