Record Class GraphStore.Edge

java.lang.Object
java.lang.Record
com.tnsai.intelligence.rag.graph.GraphStore.Edge
Record Components:
id - stable provider-local edge identifier
fromNodeId - source node identifier
toNodeId - destination node identifier
type - provider-defined relationship type
weight - 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 Details

    • Edge

      public Edge(String id, String fromNodeId, String toNodeId, String type, double weight, Map<String,String> metadata)
      Creates an instance of a Edge record class.
      Parameters:
      id - the value for the id record component
      fromNodeId - the value for the fromNodeId record component
      toNodeId - the value for the toNodeId record component
      type - the value for the type record component
      weight - the value for the weight record component
      metadata - the value for the metadata record component
  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • fromNodeId

      public String fromNodeId()
      Returns the value of the fromNodeId record component.
      Returns:
      the value of the fromNodeId record component
    • toNodeId

      public String toNodeId()
      Returns the value of the toNodeId record component.
      Returns:
      the value of the toNodeId record component
    • type

      public String type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • weight

      public double weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component
    • metadata

      public Map<String,String> metadata()
      Returns the value of the metadata record component.
      Returns:
      the value of the metadata record component