Interface Path.Segment

Enclosing interface:
Path

public static interface Path.Segment
A segment combines a relationship in a path with a start and end node that describe the traversal direction for that relationship. This exists because the relationship has a direction between the two nodes that is separate and potentially different from the direction of the path. Path: (n1)-[r1]->(n2)<-[r2]-(n3) Segment 1: (n1)-[r1]->(n2) Segment 2: (n2)<-[r2]-(n3)
  • Method Summary

    Modifier and Type
    Method
    Description
    end()
    The node that this segment ends at.
     
    The node that this segment starts at.
  • Method Details

    • relationship

      Relationship relationship()
      Returns:
      the relationship underlying this path segment
    • start

      Node start()
      The node that this segment starts at.
      Returns:
      the start node
    • end

      Node end()
      The node that this segment ends at.
      Returns:
      the end node