public class CountingWalker extends Object implements GraphWalker
Graphable.setCount(int)| Constructor and Description |
|---|
CountingWalker() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public int visit(Graphable element, GraphTraversal traversal)
visit in interface GraphWalkerelement - 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 GraphWalkerGraphWalker.finish()public int getCount()
Copyright © 1996–2019 Geotools. All rights reserved.