org.geotools.graph.traverse
Interface GraphWalker

All Known Implementing Classes:
CountingWalker, CycleDetector, DijkstraShortestPathFinder, DummyGraphWalker, GraphPartitioner, SimpleGraphWalker

public interface GraphWalker

Iterated over the components of a graph using a standard visitor pattern.

Author:
Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net

Method Summary
 void finish()
          Called when the graph traversal is completed.
 int visit(Graphable element, GraphTraversal traversal)
          Visits a graph component.
 

Method Detail

visit

public int visit(Graphable element,
                 GraphTraversal traversal)
Visits a graph component.

Parameters:
element - The component being visited.
traversal - The traversal controlling the sequence of graph component visits.
Returns:
GraphTraversal#CONTINUE to signal that the traversal should continue.
GraphTraversal#CONTINUE to signal that the traversal should suspend.
GraphTraversal#KILL_BRANCH to signal that the traversal should kill its current branch.
GraphTraversal#STOP to signal that the traversal should stop.
See Also:
GraphTraversal, GraphIterator

finish

public void finish()
Called when the graph traversal is completed. Wether this method is called after a traversal has been stopped with a return signal is up to the implementation of GraphTraversal.

See Also:
GraphTraversal


Copyright © GeoTools. All Rights Reserved.