Package com.tnsai.intelligence.rag.graph
Record Class GraphStore.Edge
java.lang.Object
java.lang.Record
com.tnsai.intelligence.rag.graph.GraphStore.Edge
- Record Components:
id- stable provider-local edge identifierfromNodeId- source node identifiertoNodeId- destination node identifiertype- provider-defined relationship typeweight- normalized traversal weight in the inclusive range [0, 1]metadata- provider-owned edge metadata
- Enclosing interface:
GraphStore
public static record GraphStore.Edge(String id, String fromNodeId, String toNodeId, String type, double weight, Map<String,String> metadata)
extends Record
A directed graph edge.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefromNodeIdrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.metadata()Returns the value of themetadatarecord component.toNodeId()Returns the value of thetoNodeIdrecord 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
-
Edge
public Edge(String id, String fromNodeId, String toNodeId, String type, double weight, Map<String, String> metadata) Creates an instance of aEdgerecord class.- Parameters:
id- the value for theidrecord componentfromNodeId- the value for thefromNodeIdrecord componenttoNodeId- the value for thetoNodeIdrecord componenttype- the value for thetyperecord componentweight- the value for theweightrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
fromNodeId
Returns the value of thefromNodeIdrecord component.- Returns:
- the value of the
fromNodeIdrecord component
-
toNodeId
Returns the value of thetoNodeIdrecord component.- Returns:
- the value of the
toNodeIdrecord 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
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-