Interface Edge<G extends Graph<G,​N,​E>,​N extends Node<G,​N,​E>,​E extends Edge<G,​N,​E>>

  • Type Parameters:
    G - the type of Graph this edge can be used with
    N - the type of Nodes connected to this edge
    E - the type of this edge
    All Known Subinterfaces:
    CodeEdge<G,​N,​E>
    All Known Implementing Classes:
    CallGraphEdge, Edge, FalseEdge, SequentialEdge, TrueEdge

    public interface Edge<G extends Graph<G,​N,​E>,​N extends Node<G,​N,​E>,​E extends Edge<G,​N,​E>>
    An edge of a Graph.
    • Method Detail

      • getSource

        N getSource()
        Yields the node where this edge originates.
        Returns:
        the source node
      • getDestination

        N getDestination()
        Yields the node where this edge ends.
        Returns:
        the destination node
      • accept

        <V> boolean accept​(GraphVisitor<G,​N,​E,​V> visitor,
                           V tool)
        Accepts the given GraphVisitor. Implementors of this method are responsible for invoking GraphVisitor.visit(Object, Graph, Edge) on this edge. The visiting should stop if such call returns false.
        Type Parameters:
        V - the type of auxiliary tool that visitor can use
        Parameters:
        visitor - the visitor that is visiting the Graph containing this edge
        tool - the auxiliary tool that visitor can use
        Returns:
        whether or not the visiting should stop when this call returns, as decided by the visitor itself