Class ImmutableEdge

  • All Implemented Interfaces:
    Edge

    public class ImmutableEdge
    extends java.lang.Object
    implements Edge
    An immutable implementation of Edge
    Since:
    5.0.4
    Version:
    6.0
    Author:
    Evren Sirin
    • Constructor Detail

      • ImmutableEdge

        public ImmutableEdge​(java.lang.String theStartVar,
                             java.lang.String theEndVar,
                             BindingSet theBindings)
    • Method Detail

      • getStart

        public Value getStart()
        Description copied from interface: Edge
        Returns the start node of the edge. Equivalent to getBindings().getValue(getStartVar()).
        Specified by:
        getStart in interface Edge
        Returns:
        the start node of the edge
      • getEnd

        public Value getEnd()
        Description copied from interface: Edge
        Returns the end node of the edge. Equivalent to getBindings().getValue(getEndVar()).
        Specified by:
        getEnd in interface Edge
        Returns:
        the end node of the edge
      • getBindings

        public BindingSet getBindings()
        Description copied from interface: Edge
        Returns the bindings for the edge.
        Specified by:
        getBindings in interface Edge
        Returns:
        the bindings for the edge.
      • 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