org.jikesrvm.compilers.opt.util
Class DepthFirstEnumerator

java.lang.Object
  extended by org.jikesrvm.compilers.opt.util.DepthFirstEnumerator
All Implemented Interfaces:
Enumeration<GraphNode>

public final class DepthFirstEnumerator
extends Object
implements Enumeration<GraphNode>


Field Summary
private  Stack<GraphNode> stack
           
private  Set<GraphNode> visited
           
 
Constructor Summary
DepthFirstEnumerator(GraphNode start)
           
 
Method Summary
 boolean hasMoreElements()
           
 GraphNode nextElement()
           
private  boolean notVisited(GraphNode node)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

private final Stack<GraphNode> stack

visited

private final Set<GraphNode> visited
Constructor Detail

DepthFirstEnumerator

public DepthFirstEnumerator(GraphNode start)
Method Detail

hasMoreElements

public boolean hasMoreElements()
Specified by:
hasMoreElements in interface Enumeration<GraphNode>

nextElement

public GraphNode nextElement()
Specified by:
nextElement in interface Enumeration<GraphNode>

notVisited

private boolean notVisited(GraphNode node)