org.geotools.graph.traverse
Interface GraphWalker

All Known Implementing Classes:
AStarShortestPathFinder, CountingWalker, CycleDetector, DijkstraShortestPathFinder, DirectedCycleDetector, 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

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

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 © 1996-2014 Geotools. All Rights Reserved.