Interface MutableTreeNode<T>

  • All Superinterfaces:
    GenericTreeNode<T>
    All Known Implementing Classes:
    MutableTreeNodeImpl

    public interface MutableTreeNode<T>
    extends GenericTreeNode<T>
    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.
    Since:
    MicroStrategy Web 9.0.0
    • Method Detail

      • setName

        void setName​(java.lang.String name)
        Sets the name associated with this node.
        Parameters:
        name - The name to associate with this node.
      • setValue

        void setValue​(T value)
        Sets the value associated with this node.
        Parameters:
        value - The value to associate with this node.
      • add

        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.
        See Also:
        add(MutableTreeNode, int)
      • add

        void add​(MutableTreeNode<T> treeNode,
                 int index)
          throws java.lang.IllegalArgumentException,
                 java.lang.ArrayIndexOutOfBoundsException
        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:
        java.lang.IllegalArgumentException - If the 'treeNode' parameter is null or is an ancestor of this node.
        java.lang.ArrayIndexOutOfBoundsException - If the 'index' parameter is less than 0 or greater than the number of children currently in the list.
      • remove

        void remove​(MutableTreeNode<T> treeNode)
             throws java.lang.IllegalArgumentException
        Removes a specific GenericTreeNode from the list of children.
        Parameters:
        treeNode - The MutableTreeNode to remove.
        Throws:
        java.lang.IllegalArgumentException - If 'treeNode' is either null or NOT a child of this node.
      • remove

        MutableTreeNode<T> remove​(int index)
                           throws java.lang.ArrayIndexOutOfBoundsException
        Removes a child at a specific index.
        Parameters:
        index - The index of the child to remove.
        Returns:
        The MutableTreeNode removed by this operation.
        Throws:
        java.lang.ArrayIndexOutOfBoundsException - If the index is less than 0 or greater than or equal to the number of children currently in the list.