org.geotools.graph.traverse
Interface GraphTraversal

All Known Implementing Classes:
AbstractGraphTraversal

public interface GraphTraversal

The GraphTraversal interface represents an algorithm with which to traverse or walk the graph. Using a visitor pattern, the GraphTraversal dispatches a GraphWalker to elements in the graph based on the traversing algorithm.


Field Summary
static int CONTINUE
          flag to indicate that a traversal should continue
static int STOP
          flag to indivate that a traversal should top
 
Method Summary
 void finish()
          Called when the traversal has been completed.
 Graph getGraph()
          Returns the graph the traversal is being made upon.
 GraphWalker getWalker()
          Returns the GraphWalker whom the traversal is dispatching to elements in the graph.
 void initEdges()
          Initializes each Edge in the graph in preparation for the traversal.
 void initNodes()
          Initializes each Node in the graph in preparation for the traversal.
 void walkEdges()
          Performs the traversal over the edges of the graph.
 void walkNodes()
          Performs the traversal over the nodes of the graph.
 

Field Detail

CONTINUE

public static final int CONTINUE
flag to indicate that a traversal should continue

See Also:
Constant Field Values

STOP

public static final int STOP
flag to indivate that a traversal should top

See Also:
Constant Field Values
Method Detail

initNodes

public void initNodes()
Initializes each Node in the graph in preparation for the traversal.


initEdges

public void initEdges()
Initializes each Edge in the graph in preparation for the traversal.


walkNodes

public void walkNodes()
Performs the traversal over the nodes of the graph.


walkEdges

public void walkEdges()
Performs the traversal over the edges of the graph.


finish

public void finish()
Called when the traversal has been completed.


getGraph

public Graph getGraph()
Returns the graph the traversal is being made upon.


getWalker

public GraphWalker getWalker()
Returns the GraphWalker whom the traversal is dispatching to elements in the graph.