Record Class JobUnassigned
java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.listener.events.JobUnassigned
- Record Components:
iteration- The iteration numbertimestamp- When the event occurredjob- The job that could not be insertedfailedConstraintsByRoute- Map of route IDs to list of failed constraint namesreason- Summary reason why the job could not be inserted
- All Implemented Interfaces:
AlgorithmEvent
public record JobUnassigned(int iteration, long timestamp, Job job, Map<String,List<String>> failedConstraintsByRoute, String reason)
extends Record
implements AlgorithmEvent
Event emitted when a job cannot be inserted and remains unassigned.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailedConstraintsByRouterecord component.final inthashCode()Returns a hash code value for this object.intReturns the value of theiterationrecord component.job()Returns the value of thejobrecord component.reason()Returns the value of thereasonrecord component.longReturns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JobUnassigned
public JobUnassigned(int iteration, long timestamp, Job job, Map<String, List<String>> failedConstraintsByRoute, String reason) Creates an instance of aJobUnassignedrecord class.- Parameters:
iteration- the value for theiterationrecord componenttimestamp- the value for thetimestamprecord componentjob- the value for thejobrecord componentfailedConstraintsByRoute- the value for thefailedConstraintsByRouterecord componentreason- the value for thereasonrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components 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
-
job
Returns the value of thejobrecord component.- Returns:
- the value of the
jobrecord component
-
failedConstraintsByRoute
Returns the value of thefailedConstraintsByRouterecord component.- Returns:
- the value of the
failedConstraintsByRouterecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-