|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.graph.traverse.basic.CountingWalker
An implementation of GraphWalker that counts the number of components visited. As each component is visited, the walker sets the count of the component to the value of its counter.
Graphable.setCount(int)
Constructor Summary | |
CountingWalker()
|
Method Summary | |
void |
finish()
Does nothing. |
int |
getCount()
Returns the value of the visitation counter. |
int |
visit(Graphable element,
GraphTraversal traversal)
Sets the count of the component and increments the counter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CountingWalker()
Method Detail |
public int visit(Graphable element, GraphTraversal traversal)
visit
in interface GraphWalker
element
- The component being visited.traversal
- The traversal controlling the sequence of graph
component visits.
Graphable.setCount(int)
,
GraphWalker.visit(Graphable, GraphTraversal)
public void finish()
finish
in interface GraphWalker
GraphWalker.finish()
public int getCount()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |