java.lang.Object | |
↳ | com.microstrategy.utils.GenericTreeNodeImpl<T> |
![]() |
This class represents a generic node in an ordered tree data structure. It is
not a changeable ("mutable") tree node, however. To modify a tree node, you
need a MutableTreeNodeImpl
class (which implements the MutableTreeNode
interface).
This class and its subclasses are not synchronized.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
public static final Enumeration<Object> | EMPTY_ENUMERATION | An enumeration that is always empty. | |||||||||
protected List<GenericTreeNode<T>> | children | ||||||||||
protected String | name | ||||||||||
protected GenericTreeNode<T> | parent | ||||||||||
protected T | value |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getChildCount()
Returns the number of children for this node.
| ||||||||||
Enumeration<GenericTreeNode<T>> |
getChildren()
Returns the enumeration of children for this node.
| ||||||||||
String |
getName()
Returns the name associated with this node, if any.
| ||||||||||
GenericTreeNode<T> |
getParent()
Returns the parent of this node.
| ||||||||||
T |
getValue()
Returns the value associated with this node, if any.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
ensureChildren()
Ensure that we have space to hold children.
| ||||||||||
boolean |
isNodeAncestor(GenericTreeNode<T> treeNode)
Returns whether the supplied node is an ancestor of this node.
| ||||||||||
boolean |
isNodeChild(GenericTreeNode<T> treeNode)
Returns whether the specified GenericTreeNode is a child of this node.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() |
An enumeration that is always empty. This is used when an enumeration of a leaf node's children is requested.
Returns the number of children for this node.
Returns the enumeration of children for this node. It will always return a non-null Enumeration, though it may be empty.
Returns the name associated with this node, if any.
Returns the parent of this node.
GenericTreeNode
which is the parent of this node, if any.
Returns the value associated with this node, if any.
Ensure that we have space to hold children.
Returns whether the supplied node is an ancestor of this node.
treeNode | The node to examine. |
---|
Returns whether the specified GenericTreeNode is a child of this node.
treeNode | The GenericTreeNode to examine. |
---|