EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.tree
Class PreorderEnumeration

java.lang.Object
  extended by echopoint.tree.PreorderEnumeration
All Implemented Interfaces:
Serializable, Enumeration<TreeNode>

public final class PreorderEnumeration
extends Object
implements Enumeration<TreeNode>, Serializable

An enumeration used to traverse the subtree rooted at a node in preorder. The first node returned by the enumeration's nextElement() method is the node from which the enumeration was created.

Since:
3.0.0b3
Version:
$Id: PreorderEnumeration.java 213 2009-06-03 16:34:13Z sptrakesh $
Author:
Brad Baker, Rakesh Vidyadharan 2009-05-29
See Also:
Serialized Form

Field Summary
protected  Stack<Enumeration<TreeNode>> stack
           
 
Constructor Summary
PreorderEnumeration(TreeNode rootNode)
          Create a new enumeration for the specified node.
 
Method Summary
 boolean hasMoreElements()
          
 TreeNode nextElement()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stack

protected Stack<Enumeration<TreeNode>> stack
Constructor Detail

PreorderEnumeration

public PreorderEnumeration(TreeNode rootNode)
Create a new enumeration for the specified node.

Parameters:
rootNode - The node for which a pre-order enumeration is to be returned.
Method Detail

hasMoreElements

public boolean hasMoreElements()

Specified by:
hasMoreElements in interface Enumeration<TreeNode>

nextElement

public TreeNode nextElement()

Specified by:
nextElement in interface Enumeration<TreeNode>

EchoPoint API - 3.0.0b5
App Webcontainer