Record Class NetworkGraph.NetworkEdge<V>
java.lang.Object
java.lang.Record
org.episteme.core.mathematics.discrete.NetworkGraph.NetworkEdge<V>
- All Implemented Interfaces:
Graph.Edge<V>
- Enclosing class:
NetworkGraph<V>
public static record NetworkGraph.NetworkEdge<V>(V source, V target, String type, double weight)
extends Record
implements Graph.Edge<V>
-
Constructor Summary
ConstructorsConstructorDescriptionNetworkEdge(V source, V target, String type, double weight) Creates an instance of aNetworkEdgerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal 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.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.doubleweight()Returns the value of theweightrecord component.
-
Constructor Details
-
NetworkEdge
Creates an instance of aNetworkEdgerecord class.- Parameters:
source- the value for thesourcerecord componenttarget- the value for thetargetrecord componenttype- the value for thetyperecord componentweight- the value for theweightrecord component
-
-
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.- Specified by:
sourcein interfaceGraph.Edge<V>- Returns:
- the value of the
sourcerecord component
-
target
Returns the value of thetargetrecord component.- Specified by:
targetin interfaceGraph.Edge<V>- Returns:
- the value of the
targetrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-