org.geotools.graph.traverse
Class DepthFirstTraversal

java.lang.Object
  extended byorg.geotools.graph.traverse.AbstractGraphTraversal
      extended byorg.geotools.graph.traverse.SourceGraphTraversal
          extended byorg.geotools.graph.traverse.DepthFirstTraversal
All Implemented Interfaces:
GraphTraversal

public class DepthFirstTraversal
extends SourceGraphTraversal

Performs a Depfth First traversal of the graph.


Field Summary
 
Fields inherited from interface org.geotools.graph.traverse.GraphTraversal
CONTINUE, STOP
 
Constructor Summary
DepthFirstTraversal(Graph graph, GraphWalker walker, GraphComponent source)
           
 
Method Summary
 java.util.Collection getActiveElements()
          Returns the active elements of the traversal.
protected  void walk()
           
 
Methods inherited from class org.geotools.graph.traverse.SourceGraphTraversal
getSource, walkEdges, walkNodes
 
Methods inherited from class org.geotools.graph.traverse.AbstractGraphTraversal
finish, getGraph, getWalker, initEdges, initNodes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DepthFirstTraversal

public DepthFirstTraversal(Graph graph,
                           GraphWalker walker,
                           GraphComponent source)
Method Detail

getActiveElements

public java.util.Collection getActiveElements()
Description copied from class: SourceGraphTraversal
Returns the active elements of the traversal. That is elements that are in the process of being visited, or are queued to be visited.

Specified by:
getActiveElements in class SourceGraphTraversal
See Also:
SourceGraphTraversal.getActiveElements()

walk

protected void walk()
Specified by:
walk in class SourceGraphTraversal