java.lang.Object | ||
↳ | com.microstrategy.utils.FlattenedEnumerationBase | |
↳ | com.microstrategy.utils.PreorderEnumeration |
This class performs a preorder traversal of the tree specified by the
supplied GenericTreeNode
. The result is an java.util.Enumeration of FlattenedTreeNode
objects. A FlattenedTreeNode
is a proxy
for the underlying GenericTreeNode
, with one exception. If the
node specified for traversal is not the root node in the larger tree, it is
will appear as the root in the flattened tree node hierarchy; that is, the
getParent()
method will
return null
for the root node supplied to the traversal.
Finally, a preorder enumeration can be performed on a single root node or
a "forest" of root nodes.
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
PreorderEnumeration(GenericTreeNode treeNode)
Creates a new PreorderEnumeration object.
| |||||||||||
PreorderEnumeration(Vector forest)
Creates a new PreorderEnumeration object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
boolean |
hasMoreElements()
Whether the enumeration has any more elements.
| ||||||||||
Object |
nextElement()
The next element in this enumeration.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new PreorderEnumeration object.
treeNode | The sole, root GenericTreeNode instance that is
being traversed. It and all of its children are traversed.
|
---|
Creates a new PreorderEnumeration object.
forest | A list of GenericTreeNode instances which form the
"forest" of trees.
|
---|
Whether the enumeration has any more elements.
The next element in this enumeration. For this traversal, the parent node is returned before any of its children.
FlattenedTreeNode
object in the traversal of
this tree.