Package org.geotools.graph.traverse
Interface GraphWalker
-
- All Known Implementing Classes:
AStarShortestPathFinder,CountingWalker,CycleDetector,DijkstraShortestPathFinder,DirectedCycleDetector,DummyGraphWalker,GraphPartitioner,SimpleGraphWalker
public interface GraphWalkerIterated over the components of a graph using a standard visitor pattern.- Author:
- Justin Deoliveira, Refractions Research Inc, jdeolive@refractions.net
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidfinish()Called when the graph traversal is completed.intvisit(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. Whether this method is called after a traversal has been stopped with a return signal is up to the implementation of GraphTraversal.- See Also:
GraphTraversal
-
-