public class

FlattenedEnumerationBase

extends Object
java.lang.Object
   ↳ com.microstrategy.utils.FlattenedEnumerationBase
Known Direct Subclasses

Class Overview

This is the base class for a set of classes that produce an enumeration (or "flattening") of a Tree.

Summary

Constants
int LOCATION_BASE_INDEX This is the starting (or base) index of a node in a tree.
String LOCATION_SEPARATOR This is the separator between indices of children in the larger "location string".
Fields
protected Stack locationStack
protected Stack nodeStack
Public Constructors
FlattenedEnumerationBase(GenericTreeNode treeNode)
Creates a new FlattenedEnumerationBase object.
FlattenedEnumerationBase(Vector forest)
Creates a new FlattenedEnumerationBase object.
Protected Methods
Enumeration getLocationEnum(String startLocation, int numLocs)
Gets an enumeration of location strings (starting a specific location).
boolean isRootNode(GenericTreeNode node)
Returns whether the specified node is a "root node" for this specific traversal.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int LOCATION_BASE_INDEX

This is the starting (or base) index of a node in a tree. This number is used in "location strings" returned by getLocation().

Constant Value: 0 (0x00000000)

public static final String LOCATION_SEPARATOR

This is the separator between indices of children in the larger "location string".

Constant Value: "/"

Fields

protected Stack locationStack

protected Stack nodeStack

Public Constructors

public FlattenedEnumerationBase (GenericTreeNode treeNode)

Creates a new FlattenedEnumerationBase object.

Parameters
treeNode A single tree to traverse.

public FlattenedEnumerationBase (Vector forest)

Creates a new FlattenedEnumerationBase object.

Parameters
forest A Vector of root nodes to traverse.

Protected Methods

protected Enumeration getLocationEnum (String startLocation, int numLocs)

Gets an enumeration of location strings (starting a specific location).

Parameters
startLocation The starting location of a parent node.
numLocs The number of location strings to create.
Returns
  • An Enumeration of Strings.

protected boolean isRootNode (GenericTreeNode node)

Returns whether the specified node is a "root node" for this specific traversal.

Parameters
node The GenericTreeNode to consider.
Returns
  • True if the specified node is a "root node" for this specific traversal; otherwise, false.