public class

MutableTreeNodeImpl

extends GenericTreeNodeImpl<T>
implements MutableTreeNode<T>
java.lang.Object
   ↳ com.microstrategy.utils.GenericTreeNodeImpl<T>
     ↳ com.microstrategy.utils.MutableTreeNodeImpl<T>

Class Overview

This is a mutable (changeable) Tree Node.

Summary

[Expand]
Inherited Fields
From class com.microstrategy.utils.GenericTreeNodeImpl
Public Constructors
MutableTreeNodeImpl()
Creates a new MutableTreeNodeImpl object.
MutableTreeNodeImpl(String name)
Creates a new MutableTreeNodeImpl object.
MutableTreeNodeImpl(String name, T value)
Creates a new MutableTreeNodeImpl object.
Public Methods
void add(MutableTreeNode<T> treeNode, int index)
Adds a node as a child of this node at a specified position.
void add(MutableTreeNode<T> treeNode)
Adds a node to the end of a list of children of this node.
MutableTreeNode<T> remove(int index)
Removes a child at a specific index.
void remove(MutableTreeNode<T> treeNode)
Removes a specific GenericTreeNode from the list of children.
void setName(String name)
Sets the name associated with this node.
void setValue(T value)
Sets the value associated with this node.
[Expand]
Inherited Methods
From class com.microstrategy.utils.GenericTreeNodeImpl
From class java.lang.Object
From interface com.microstrategy.utils.GenericTreeNode
From interface com.microstrategy.utils.MutableTreeNode

Public Constructors

public MutableTreeNodeImpl ()

Creates a new MutableTreeNodeImpl object. Both the name and value are left undefined.

public MutableTreeNodeImpl (String name)

Creates a new MutableTreeNodeImpl object. The name is defined here, but the value is not.

Parameters
name The name of the node.

public MutableTreeNodeImpl (String name, T value)

Creates a new MutableTreeNodeImpl object. Both the name and value are specified.

Parameters
name The name of the node.
value The value of the node.

Public Methods

public void add (MutableTreeNode<T> treeNode, int index)

Adds a node as a child of this node at a specified position.

Parameters
treeNode The MutableTreeNode to add.
index The position in the children list to add into.
Throws
ArrayIndexOutOfBoundsException
IllegalArgumentException

public void add (MutableTreeNode<T> treeNode)

Adds a node to the end of a list of children of this node. This is merely a shortcut to using the full version of this method #add(GenericTreeNode, int) See it for more details.

Parameters
treeNode The MutableTreeNode to add.

public MutableTreeNode<T> remove (int index)

Removes a child at a specific index.

Parameters
index The index of the child to remove.
Returns
Throws
ArrayIndexOutOfBoundsException

public void remove (MutableTreeNode<T> treeNode)

Removes a specific GenericTreeNode from the list of children.

Parameters
treeNode The MutableTreeNode to remove.
Throws
IllegalArgumentException

public void setName (String name)

Sets the name associated with this node.

Parameters
name The name to associate with this node.

public void setValue (T value)

Sets the value associated with this node.

Parameters
value The value to associate with this node.