Class FlattenedTreeNodeImpl

  • All Implemented Interfaces:
    FlattenedTreeNode, GenericTreeNode

    public class FlattenedTreeNodeImpl
    extends java.lang.Object
    implements FlattenedTreeNode
    This is the implementation class for the FlattenedTreeNode interface. In general, this class delegates to a held GenericTreeNode with the exception of the "parent" link. When a root node is being traversed, it may not be the root node in its containing graph. Instead of requiring the node to be a root in the larger tree, we simply manage the parent link in this object.
    Since:
    MicroStrategy Web 9.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getChildCount()
      Returns the number of children for this node.
      java.util.Enumeration getChildren()
      Returns the enumeration of children for this node.
      java.lang.String getLocation()
      Returns the location of this node in the larger tree using a modified Dewey Decimal notation.
      java.lang.String getName()
      Returns the name associated with this node, if any.
      GenericTreeNode getParent()
      Returns the parent of this node.
      java.lang.Object getValue()
      Returns the value associated with this node, if any.
      • Methods inherited from class java.lang.Object

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

      • FlattenedTreeNodeImpl

        public FlattenedTreeNodeImpl​(GenericTreeNode treeNode,
                                     java.lang.String location,
                                     GenericTreeNode parent)
        Creates a new FlattenedTreeNodeImpl object.
        Parameters:
        treeNode - The node in the supplied tree that this object represents.
        location - The location string for this tree node.
        parent - The parent of this flattened tree node.
    • Method Detail

      • getLocation

        public java.lang.String getLocation()
        Description copied from interface: FlattenedTreeNode
        Returns the location of this node in the larger tree using a modified Dewey Decimal notation. The location of the root node in the first tree is "0". The location of the second root node (assuming it is a forest of tree node that we are flattening) is "1". The first child of the first root node is "0/0".
        Specified by:
        getLocation in interface FlattenedTreeNode
        Returns:
        The location of this node in the tree it is contained in.
      • getName

        public java.lang.String getName()
        Description copied from interface: GenericTreeNode
        Returns the name associated with this node, if any.
        Specified by:
        getName in interface GenericTreeNode
        Returns:
        The name associated with this node, if any.
      • getValue

        public java.lang.Object getValue()
        Description copied from interface: GenericTreeNode
        Returns the value associated with this node, if any.
        Specified by:
        getValue in interface GenericTreeNode
        Returns:
        The value associated with this node, if any.
      • getChildren

        public java.util.Enumeration getChildren()
        Description copied from interface: GenericTreeNode
        Returns the enumeration of children for this node. It will always return a non-null Enumeration, though it may be empty.
        Specified by:
        getChildren in interface GenericTreeNode
        Returns:
        The Enumeration of children.
      • getChildCount

        public int getChildCount()
        Description copied from interface: GenericTreeNode
        Returns the number of children for this node.
        Specified by:
        getChildCount in interface GenericTreeNode
        Returns:
        The number of children for this node.