org.jikesrvm.compilers.opt.util
Class TreeNodeChildrenEnumerator

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

final class TreeNodeChildrenEnumerator
extends Object
implements Enumeration<TreeNode>

This class provides enumeration of all children of a TreeNode


Field Summary
private  TreeNode currentChild
          the current child we are working on
 
Constructor Summary
TreeNodeChildrenEnumerator(TreeNode node)
          Provides iteration over a list of children tree nodes
 
Method Summary
 boolean hasMoreElements()
          any elements left?
 TreeNode nextElement()
          returns the next element in the list iterator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentChild

private TreeNode currentChild
the current child we are working on

Constructor Detail

TreeNodeChildrenEnumerator

TreeNodeChildrenEnumerator(TreeNode node)
Provides iteration over a list of children tree nodes

Parameters:
node - Root of the tree to iterate over.
Method Detail

hasMoreElements

public boolean hasMoreElements()
any elements left?

Specified by:
hasMoreElements in interface Enumeration<TreeNode>
Returns:
whether there are any elements left

nextElement

public TreeNode nextElement()
returns the next element in the list iterator

Specified by:
nextElement in interface Enumeration<TreeNode>
Returns:
the next element in the list iterator or null