Record Class PDPTWDominanceKey
java.lang.Object
java.lang.Record
org.ddolib.examples.layered.pdptw.PDPTWDominanceKey
- Record Components:
openToVisit- currently reachable unvisited nodesallToVisit- all remaining unvisited nodescurrent- current node(s)minContent- lower bound on vehicle loadmaxContent- upper bound on vehicle load
public record PDPTWDominanceKey(BitSet openToVisit, BitSet allToVisit, BitSet current, int minContent, int maxContent)
extends Record
Compact dominance key for PDPTW states.
-
Constructor Summary
ConstructorsConstructorDescriptionPDPTWDominanceKey(BitSet openToVisit, BitSet allToVisit, BitSet current, int minContent, int maxContent) Creates an instance of aPDPTWDominanceKeyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallToVisitrecord component.current()Returns the value of thecurrentrecord 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 themaxContentrecord component.intReturns the value of theminContentrecord component.Returns the value of theopenToVisitrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
PDPTWDominanceKey
public PDPTWDominanceKey(BitSet openToVisit, BitSet allToVisit, BitSet current, int minContent, int maxContent) Creates an instance of aPDPTWDominanceKeyrecord class.- Parameters:
openToVisit- the value for theopenToVisitrecord componentallToVisit- the value for theallToVisitrecord componentcurrent- the value for thecurrentrecord componentminContent- the value for theminContentrecord componentmaxContent- the value for themaxContentrecord 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 '=='. -
openToVisit
Returns the value of theopenToVisitrecord component.- Returns:
- the value of the
openToVisitrecord component
-
allToVisit
Returns the value of theallToVisitrecord component.- Returns:
- the value of the
allToVisitrecord component
-
current
Returns the value of thecurrentrecord component.- Returns:
- the value of the
currentrecord component
-
minContent
public int minContent()Returns the value of theminContentrecord component.- Returns:
- the value of the
minContentrecord component
-
maxContent
public int maxContent()Returns the value of themaxContentrecord component.- Returns:
- the value of the
maxContentrecord component
-