EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.tree
Class PostorderEnumeration

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

public final class PostorderEnumeration
extends Object
implements Enumeration<TreeNode>

An enumeration that traverses the subtree rooted at a node in postorder. The first node returned by the enumeration's nextElement() method is the leftmost leaf. This is the same as a depth-first traversal.

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

Field Summary
protected  Enumeration<TreeNode> children
           
protected  TreeNode root
           
protected  Enumeration<TreeNode> subtree
           
 
Constructor Summary
PostorderEnumeration(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

root

protected TreeNode root

children

protected Enumeration<TreeNode> children

subtree

protected Enumeration<TreeNode> subtree
Constructor Detail

PostorderEnumeration

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

Parameters:
rootNode - The node for which the enumeration is to be created.
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