Record Class STNURTE.NodeWithTimeInterval
java.lang.Object
java.lang.Record
it.univr.di.cstnu.algorithms.STNURTE.NodeWithTimeInterval
- Record Components:
timeInterval- the time window of the nodenode- the node
- 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 aNodeWithTimeIntervalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.node()Returns the value of thenoderecord component.Returns the value of thetimeIntervalrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
NodeWithTimeInterval
Creates an instance of aNodeWithTimeIntervalrecord class.- Parameters:
timeInterval- the value for thetimeIntervalrecord componentnode- the value for thenoderecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<STNURTE.NodeWithTimeInterval>- Parameters:
other- another node with a time interval- Returns:
- negative value if this node is alphabetical before another node, 0 if both have the same name, positive value if this node is alphabetical after the 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 thetimeIntervalrecord component.- Returns:
- the value of the
timeIntervalrecord component
-
node
-