public final class ManagementGraphIterator extends Object implements Iterator<ManagementVertex>
Iterator interface which allows to
traverse a management graph and visit every reachable vertex exactly once. The order
in which the vertices are visited corresponds to the order of their discovery in a depth first
search.
This class is not thread-safe.
| Constructor and Description |
|---|
ManagementGraphIterator(ManagementGraph managementGraph,
boolean forward)
Creates a new management graph iterator.
|
ManagementGraphIterator(ManagementGraph managementGraph,
int startStage,
boolean confinedToStage,
boolean forward)
Creates a new management graph iterator.
|
ManagementGraphIterator(ManagementGraph managementGraph,
ManagementVertex startVertex,
boolean forward)
Creates a new management graph iterator.
|
public ManagementGraphIterator(ManagementGraph managementGraph, boolean forward)
managementGraph - the management graph that should be traversedforward - true if the graph should be traversed in correct order, false to traverse it in
reverse orderpublic ManagementGraphIterator(ManagementGraph managementGraph, int startStage, boolean confinedToStage, boolean forward)
managementGraph - the management graph that should be traversedstartStage - the index of the stage of the graph where the traversal is supposed to beginconfinedToStage - false if the graph iterator is allowed to traverse to upper (in case of reverse order
traversal lower) stages, true otherwise.forward - true if the graph should be traversed in correct order, false to traverse it in
reverse orderpublic ManagementGraphIterator(ManagementGraph managementGraph, ManagementVertex startVertex, boolean forward)
startVertex.
The iterator will not switch to the next input/output vertex of an output/input vertex
has been reached.managementGraph - the management graph that should be traversedstartVertex - the vertex to start the traversal fromforward - true if the graph should be traversed in correct order, false to reverse it in
reverse orderpublic boolean hasNext()
hasNext in interface Iterator<ManagementVertex>public ManagementVertex next()
next in interface Iterator<ManagementVertex>public void remove()
remove in interface Iterator<ManagementVertex>Copyright © 2014 The Apache Software Foundation. All rights reserved.