Record Class IterationStarted
java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.listener.events.IterationStarted
- Record Components:
iteration- The iteration number (1-based)timestamp- When the event occurredcurrentBestCost- The cost of the current best solution
- All Implemented Interfaces:
AlgorithmEvent
public record IterationStarted(int iteration, long timestamp, double currentBestCost)
extends Record
implements AlgorithmEvent
Event emitted when an iteration starts.
-
Constructor Summary
ConstructorsConstructorDescriptionIterationStarted(int iteration, long timestamp, double currentBestCost) Creates an instance of aIterationStartedrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thecurrentBestCostrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of theiterationrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
IterationStarted
public IterationStarted(int iteration, long timestamp, double currentBestCost) Creates an instance of aIterationStartedrecord class.- Parameters:
iteration- the value for theiterationrecord componenttimestamp- the value for thetimestamprecord componentcurrentBestCost- the value for thecurrentBestCostrecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
iteration
public int iteration()Returns the value of theiterationrecord component.- Specified by:
iterationin interfaceAlgorithmEvent- Returns:
- the value of the
iterationrecord component
-
timestamp
public long timestamp()Returns the value of thetimestamprecord component.- Specified by:
timestampin interfaceAlgorithmEvent- Returns:
- the value of the
timestamprecord component
-
currentBestCost
public double currentBestCost()Returns the value of thecurrentBestCostrecord component.- Returns:
- the value of the
currentBestCostrecord component
-