public interface

MutableTreeNode

implements GenericTreeNode<T>
com.microstrategy.utils.MutableTreeNode<T>
Known Indirect Subclasses

Class Overview

This interface extends the concept of a "generic" tree node GenericTreeNode by providing a set of methods that change its contents. This includes changing the name and value, adding and removing children.

Summary

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

Public Methods

public abstract 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
IllegalArgumentException If the 'treeNode' parameter is null or is an ancestor of this node.
ArrayIndexOutOfBoundsException If the 'index' parameter is less than 0 or greater than the number of children currently in the list.

public abstract 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 abstract MutableTreeNode<T> remove (int index)

Removes a child at a specific index.

Parameters
index The index of the child to remove.
Returns
Throws
ArrayIndexOutOfBoundsException If the index is less than 0 or greater than or equal to the number of children currently in the list.

public abstract void remove (MutableTreeNode<T> treeNode)

Removes a specific GenericTreeNode from the list of children.

Parameters
treeNode The MutableTreeNode to remove.
Throws
IllegalArgumentException If 'treeNode' is either null or NOT a child of this node.

public abstract void setName (String name)

Sets the name associated with this node.

Parameters
name The name to associate with this node.

public abstract void setValue (T value)

Sets the value associated with this node.

Parameters
value The value to associate with this node.