Class ImmutablePath

  • All Implemented Interfaces:
    Path

    public class ImmutablePath
    extends java.lang.Object
    implements Path
    Immutable implementation of Path
    Since:
    5.0.4
    Version:
    6.0
    Author:
    Evren Sirin
    • Constructor Detail

      • ImmutablePath

        public ImmutablePath​(java.util.List<Edge> theEdges)
      • ImmutablePath

        public ImmutablePath​(java.util.List<Edge> theEdges,
                             BindingSet thePathStartBindings,
                             BindingSet thePathEndBindings)
      • ImmutablePath

        public ImmutablePath​(java.util.List<Edge> theEdges,
                             Value theWeight,
                             BindingSet thePathStartBindings,
                             BindingSet thePathEndBindings)
    • Method Detail

      • getPathStartBindings

        public BindingSet getPathStartBindings()
        Description copied from interface: Path
        Returns variable bindings for the start pattern of the path, if exists
        Specified by:
        getPathStartBindings in interface Path
        Returns:
        variable bindings for the start pattern of the path
      • getPathEndBindings

        public BindingSet getPathEndBindings()
        Description copied from interface: Path
        Returns variable bindings for the end pattern of the path, if exists
        Specified by:
        getPathEndBindings in interface Path
        Returns:
        variable bindings for the end pattern of the path
      • getStart

        public Value getStart()
        Description copied from interface: Path
        Returns the start node of the path. Equivalent to getEdges().get(0).getStart().
        Specified by:
        getStart in interface Path
        Returns:
        the start node of the path
      • getEnd

        public Value getEnd()
        Description copied from interface: Path
        Returns the end node of the path. Equivalent to getEdges().get(getEdge().size() - 1).getEnd().
        Specified by:
        getEnd in interface Path
        Returns:
        the end node of the path
      • getEdges

        public java.util.List<Edge> getEdges()
        Description copied from interface: Path
        Returns the edges of the path.
        Specified by:
        getEdges in interface Path
        Returns:
        the edges of the path
      • getWeight

        public Value getWeight()
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object