org.geotools.graph.traverse
Interface GraphWalker

All Known Implementing Classes:
CycleFinder, GraphFuser, SimpleGraphWalker

public interface GraphWalker

A GraphWalker walks a graph via a GraphTraversal. As well as simply visiting components of the graph when received from a traversal, the walker can also control the traversal by initializing the elements of a graph and determining when a component is considered to be visited.


Method Summary
 void finish()
          Called when the graph traversal is completed.
 void init(GraphComponent element)
          Inializes a graph component
 boolean isVisited(GraphComponent element)
          Determines if a graph component has been visited.
 int visit(GraphComponent element, GraphTraversal traversal)
          Visits a graph componenet.
 

Method Detail

init

public void init(GraphComponent element)
Inializes a graph component


isVisited

public boolean isVisited(GraphComponent element)
Determines if a graph component has been visited.


visit

public int visit(GraphComponent element,
                 GraphTraversal traversal)
Visits a graph componenet.

Parameters:
element - The component to visit.
traversal - The traversal controlling the sequence of graph component visits.

finish

public void finish()
Called when the graph traversal is completed.