org.geotools.graph.traverse.standard
Class DirectedBreadthFirstTopologicalIterator

java.lang.Object
  extended byorg.geotools.graph.traverse.basic.AbstractGraphIterator
      extended byorg.geotools.graph.traverse.standard.DirectedBreadthFirstTopologicalIterator
All Implemented Interfaces:
GraphIterator
Direct Known Subclasses:
DirectedDepthFirstTopologicalIterator

public class DirectedBreadthFirstTopologicalIterator
extends AbstractGraphIterator


Constructor Summary
DirectedBreadthFirstTopologicalIterator()
           
 
Method Summary
protected  Queue buildQueue(Graph graph)
           
 void cont(Graphable current, GraphTraversal traversal)
          Signals to the iterator that iteration should continue from the current component in the traversal.
 void init(Graph graph, GraphTraversal traversal)
          Signals to the itereator that iteration is about to begin.
 void killBranch(Graphable current, GraphTraversal traversal)
          Signals the iterator to kill the branch at the current component.
 Graphable next(GraphTraversal traversal)
          Returns the next graph component in the iteration.
 
Methods inherited from class org.geotools.graph.traverse.basic.AbstractGraphIterator
getGraph, getTraversal, getWalker, setTraversal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectedBreadthFirstTopologicalIterator

public DirectedBreadthFirstTopologicalIterator()
Method Detail

init

public void init(Graph graph,
                 GraphTraversal traversal)
Description copied from interface: GraphIterator
Signals to the itereator that iteration is about to begin. This often results in the creation/initialization of any internal data structures used by the iterator.

Parameters:
graph - The graph being whose components are being iterated over.

next

public Graphable next(GraphTraversal traversal)
Description copied from interface: GraphIterator
Returns the next graph component in the iteration. To signal to the caller that the iteration is complete, null should be returned.

Returns:
The next component in the iteration, or null if iteration is complete.

cont

public void cont(Graphable current,
                 GraphTraversal traversal)
Description copied from interface: GraphIterator
Signals to the iterator that iteration should continue from the current component in the traversal.

Parameters:
current - The current component of the traversal.

killBranch

public void killBranch(Graphable current,
                       GraphTraversal traversal)
Description copied from interface: GraphIterator
Signals the iterator to kill the branch at the current component.

Parameters:
current - The current component of the traversal.

buildQueue

protected Queue buildQueue(Graph graph)


Copyright © GeoTools. All Rights Reserved.