Record Class STNU.EdgeData
java.lang.Object
java.lang.Record
it.univr.di.cstnu.algorithms.STNU.EdgeData
- Enclosing class:
STNU
Represents the immutable triple (sourceNode, weight, destinationNode) necessary for generating an STNUEdge.
- Version:
- $Rev: 1190 $
- Author:
- posenato
-
Constructor Summary
ConstructorsConstructorDescriptionEdgeData(LabeledNode source, LabeledNode destination, int weight) Constructor for an immutable edgeData object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.source()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.intweight()Returns the value of theweightrecord component.
-
Constructor Details
-
EdgeData
EdgeData(LabeledNode source, LabeledNode destination, int weight) Constructor for an immutable edgeData object.- Parameters:
source- the source nodedestination- the destination nodeweight- the weight of the edge
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
weight
public int weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-