public final class DepthFirstEnumerator extends Object implements Enumeration<GraphNode>
| Modifier and Type | Field and Description |
|---|---|
private Stack<GraphNode> |
stack |
private Set<GraphNode> |
visited |
| Constructor and Description |
|---|
DepthFirstEnumerator(GraphNode start) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMoreElements() |
GraphNode |
nextElement() |
private boolean |
notVisited(GraphNode node) |
public DepthFirstEnumerator(GraphNode start)
public boolean hasMoreElements()
hasMoreElements in interface Enumeration<GraphNode>public GraphNode nextElement()
nextElement in interface Enumeration<GraphNode>private boolean notVisited(GraphNode node)