Record Class RuinOperatorFactory.Context
java.lang.Object
java.lang.Record
com.graphhopper.jsprit.core.algorithm.ruin.RuinOperatorFactory.Context
- Enclosing interface:
RuinOperatorFactory
public static record RuinOperatorFactory.Context(VehicleRoutingProblem vrp, StateManager stateManager, JobNeighborhoods jobNeighborhoods, double maxTransportCosts, Random random)
extends Record
Context object containing all dependencies needed to create a ruin strategy.
-
Constructor Summary
ConstructorsConstructorDescriptionContext(VehicleRoutingProblem vrp, StateManager stateManager, JobNeighborhoods jobNeighborhoods, double maxTransportCosts, Random random) Creates an instance of aContextrecord 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.Returns the value of thejobNeighborhoodsrecord component.doubleReturns the value of themaxTransportCostsrecord component.random()Returns the value of therandomrecord component.Returns the value of thestateManagerrecord component.final StringtoString()Returns a string representation of this record class.vrp()Returns the value of thevrprecord component.
-
Constructor Details
-
Context
public Context(VehicleRoutingProblem vrp, StateManager stateManager, JobNeighborhoods jobNeighborhoods, double maxTransportCosts, Random random) Creates an instance of aContextrecord class.- Parameters:
vrp- the value for thevrprecord componentstateManager- the value for thestateManagerrecord componentjobNeighborhoods- the value for thejobNeighborhoodsrecord componentmaxTransportCosts- the value for themaxTransportCostsrecord componentrandom- the value for therandomrecord 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 '=='. -
vrp
Returns the value of thevrprecord component.- Returns:
- the value of the
vrprecord component
-
stateManager
Returns the value of thestateManagerrecord component.- Returns:
- the value of the
stateManagerrecord component
-
jobNeighborhoods
Returns the value of thejobNeighborhoodsrecord component.- Returns:
- the value of the
jobNeighborhoodsrecord component
-
maxTransportCosts
public double maxTransportCosts()Returns the value of themaxTransportCostsrecord component.- Returns:
- the value of the
maxTransportCostsrecord component
-
random
Returns the value of therandomrecord component.- Returns:
- the value of the
randomrecord component
-