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

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

    public interface Edge<N extends Node<N,​E,​G>,​E extends Edge<N,​E,​G>,​G extends Graph<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
      • canBeSimplified

        boolean canBeSimplified()
        Yields true if and only if this edge could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph).
        Returns:
        whether or not this edge can be simplified
      • newInstance

        E newInstance​(N source,
                      N destination)
        Builds a new instance of this edge, connecting the given nodes.
        Parameters:
        source - the source node
        destination - the destination node
        Returns:
        a new instance of this edge, connecting the given nodes
      • 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