-
- Type Parameters:
G
- the type ofGraph
this edge can be used withN
- the type ofNode
s connected to this edgeE
- 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 aGraph
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> boolean
accept(GraphVisitor<G,N,E,V> visitor, V tool)
Accepts the givenGraphVisitor
.N
getDestination()
Yields the node where this edge ends.N
getSource()
Yields the node where this edge originates.
-
-
-
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 givenGraphVisitor
. Implementors of this method are responsible for invokingGraphVisitor.visit(Object, Graph, Edge)
on this edge. The visiting should stop if such call returnsfalse
.- Type Parameters:
V
- the type of auxiliary tool thatvisitor
can use- Parameters:
visitor
- the visitor that is visiting theGraph
containing this edgetool
- the auxiliary tool thatvisitor
can use- Returns:
- whether or not the visiting should stop when this call returns, as decided by the visitor itself
-
-