public class

FlattenedTreeNodeImpl

extends Object
implements FlattenedTreeNode
java.lang.Object
   ↳ com.microstrategy.utils.FlattenedTreeNodeImpl

Class Overview

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.

Summary

Public Constructors
FlattenedTreeNodeImpl(GenericTreeNode treeNode, String location, GenericTreeNode parent)
Creates a new FlattenedTreeNodeImpl object.
Public Methods
int getChildCount()
Returns the number of children for this node.
Enumeration getChildren()
Returns the enumeration of children for this node.
String getLocation()
Returns the location of this node in the larger tree using a modified Dewey Decimal notation.
String getName()
Returns the name associated with this node, if any.
GenericTreeNode getParent()
Returns the parent of this node.
Object getValue()
Returns the value associated with this node, if any.
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.microstrategy.utils.FlattenedTreeNode
From interface com.microstrategy.utils.GenericTreeNode

Public Constructors

public FlattenedTreeNodeImpl (GenericTreeNode treeNode, 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.

Public Methods

public int getChildCount ()

Returns the number of children for this node.

Returns
  • The number of children for this node.

public Enumeration getChildren ()

Returns the enumeration of children for this node. It will always return a non-null Enumeration, though it may be empty.

Returns
  • The Enumeration of children.

public String getLocation ()

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".

Returns
  • The location of this node in the tree it is contained in.

public String getName ()

Returns the name associated with this node, if any.

Returns
  • The name associated with this node, if any.

public GenericTreeNode getParent ()

Returns the parent of this node.

Returns

public Object getValue ()

Returns the value associated with this node, if any.

Returns
  • The value associated with this node, if any.