Class FlattenedEnumerationBase

  • Direct Known Subclasses:
    PreorderEnumeration

    public class FlattenedEnumerationBase
    extends java.lang.Object
    This is the base class for a set of classes that produce an enumeration (or "flattening") of a Tree.
    Since:
    MicroStrategy Web 9.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int LOCATION_BASE_INDEX
      This is the starting (or base) index of a node in a tree.
      static java.lang.String LOCATION_SEPARATOR
      This is the separator between indices of children in the larger "location string".
      protected java.util.Stack locationStack  
      protected java.util.Stack nodeStack  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.util.Enumeration getLocationEnum​(java.lang.String startLocation, int numLocs)
      Gets an enumeration of location strings (starting a specific location).
      protected boolean isRootNode​(GenericTreeNode node)
      Returns whether the specified node is a "root node" for this specific traversal.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOCATION_SEPARATOR

        public static final java.lang.String LOCATION_SEPARATOR
        This is the separator between indices of children in the larger "location string".
        See Also:
        Constant Field Values
      • nodeStack

        protected java.util.Stack nodeStack
      • locationStack

        protected java.util.Stack locationStack
    • Constructor Detail

      • FlattenedEnumerationBase

        public FlattenedEnumerationBase​(GenericTreeNode treeNode)
        Creates a new FlattenedEnumerationBase object.
        Parameters:
        treeNode - A single tree to traverse.
      • FlattenedEnumerationBase

        public FlattenedEnumerationBase​(java.util.Vector forest)
        Creates a new FlattenedEnumerationBase object.
        Parameters:
        forest - A Vector of root nodes to traverse.
    • Method Detail

      • getLocationEnum

        protected java.util.Enumeration getLocationEnum​(java.lang.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.
      • isRootNode

        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.