java.lang.Object
java.lang.Record
org.maxicp.cp.examples.modeling.DARPSeqVar.NodeData
- Enclosing class:
DARPSeqVar
public static record DARPSeqVar.NodeData(double x, double y, int duration, int load, int twStart, int twEnd)
extends Record
Data related to a node in the DARP problem
-
Constructor Summary
ConstructorsConstructorDescriptionNodeData(double x, double y, int duration, int load, int twStart, int twEnd) Creates an instance of aNodeDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionintintduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intload()Returns the value of theloadrecord component.final StringtoString()Returns a string representation of this record class.inttwEnd()Returns the value of thetwEndrecord component.inttwStart()Returns the value of thetwStartrecord component.doublex()Returns the value of thexrecord component.doubley()Returns the value of theyrecord component.
-
Constructor Details
-
NodeData
public NodeData(double x, double y, int duration, int load, int twStart, int twEnd) Creates an instance of aNodeDatarecord class.- Parameters:
x- the value for thexrecord componenty- the value for theyrecord componentduration- the value for thedurationrecord componentload- the value for theloadrecord componenttwStart- the value for thetwStartrecord componenttwEnd- the value for thetwEndrecord component
-
-
Method Details
-
distanceCeil
-
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 '=='. -
x
public double x()Returns the value of thexrecord component.- Returns:
- the value of the
xrecord component
-
y
public double y()Returns the value of theyrecord component.- Returns:
- the value of the
yrecord component
-
duration
public int duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
load
public int load()Returns the value of theloadrecord component.- Returns:
- the value of the
loadrecord component
-
twStart
public int twStart()Returns the value of thetwStartrecord component.- Returns:
- the value of the
twStartrecord component
-
twEnd
public int twEnd()Returns the value of thetwEndrecord component.- Returns:
- the value of the
twEndrecord component
-