simkin
Class TreeNodeIterator

java.lang.Object
  |
  +--simkin.TreeNodeIterator

public final class TreeNodeIterator
extends java.lang.Object

This class provides a means of iterating over the children of a TreeNode


Constructor Summary
TreeNodeIterator(TreeNode node)
          Constructor - is passed a TreeNode whose children will be iterated
 
Method Summary
 boolean hasMoreElements()
          This function returns true if the iteration has not yet been finished
 TreeNode nextElement()
          this function returns the next element in the iteration
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeNodeIterator

public TreeNodeIterator(TreeNode node)
Constructor - is passed a TreeNode whose children will be iterated

Method Detail

hasMoreElements

public boolean hasMoreElements()
This function returns true if the iteration has not yet been finished


nextElement

public TreeNode nextElement()
                     throws java.util.NoSuchElementException
this function returns the next element in the iteration

Throws:
java.util.NoSuchElementException - - this is thrown if the function is called after the iteration has finished