Record Class STNURTE.NodeWithTimeInterval
java.lang.Object
java.lang.Record
it.univr.di.cstnu.algorithms.STNURTE.NodeWithTimeInterval
- All Implemented Interfaces:
Comparable<STNURTE.NodeWithTimeInterval>
- Enclosing class:
STNURTE
public static record STNURTE.NodeWithTimeInterval(TimeInterval timeInterval, LabeledNode node)
extends Record
implements Comparable<STNURTE.NodeWithTimeInterval>
Node with its time window.
-
Constructor Summary
ConstructorsConstructorDescriptionNodeWithTimeInterval
(TimeInterval timeInterval, LabeledNode node) Creates an instance of aNodeWithTimeInterval
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.node()
Returns the value of thenode
record component.Returns the value of thetimeInterval
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
NodeWithTimeInterval
Creates an instance of aNodeWithTimeInterval
record class.- Parameters:
timeInterval
- the value for thetimeInterval
record componentnode
- the value for thenode
record component
-
-
Method Details
-
compareTo
- Specified by:
compareTo
in interfaceComparable<STNURTE.NodeWithTimeInterval>
- Parameters:
other
- other node with time interval- Returns:
- negative value if this node is alphabetical before other node, 0 if both have the same name, positive value if this node is alphabetical after other node.
-
toString
-
hashCode
-
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 withObjects::equals(Object,Object)
. -
timeInterval
Returns the value of thetimeInterval
record component.- Returns:
- the value of the
timeInterval
record component
-
node
Returns the value of thenode
record component.- Returns:
- the value of the
node
record component
-