-
- Type Parameters:
N- the type ofNodes connected to this edgeE- the type of this edgeG- the type ofGraphthis 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 aGraph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> booleanaccept(GraphVisitor<G,N,E,V> visitor, V tool)Accepts the givenGraphVisitor.booleancanBeSimplified()Yieldstrueif and only if this edge could be simplified if one of the nodes connected to it is simplified (i.e., removed from the graph).NgetDestination()Yields the node where this edge ends.NgetSource()Yields the node where this edge originates.EnewInstance(N source, N destination)Builds a new instance of this edge, connecting the given nodes.
-
-
-
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()
Yieldstrueif 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 nodedestination- 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 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 thatvisitorcan use- Parameters:
visitor- the visitor that is visiting theGraphcontaining this edgetool- the auxiliary tool thatvisitorcan use- Returns:
- whether or not the visiting should stop when this call returns, as decided by the visitor itself
-
-