EchoPoint API - 3.0.0b5
App Webcontainer

echopoint.tree
Class BreadthFirstEnumeration

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

public final class BreadthFirstEnumeration
extends Object
implements Enumeration<TreeNode>

An enumeration that traverses the subtree rooted at a node in breadth-first order. The first node returned by the enumeration's nextElement() method is the node for which the enumeration was created.

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

Field Summary
protected  Queue<Enumeration<TreeNode>> queue
           
 
Constructor Summary
BreadthFirstEnumeration(TreeNode rootNode)
          Create a new enumeration for the specified tree 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

queue

protected Queue<Enumeration<TreeNode>> queue
Constructor Detail

BreadthFirstEnumeration

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

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