Class MutableTreeNodeImpl<T>

    • Constructor Detail

      • MutableTreeNodeImpl

        public MutableTreeNodeImpl()
        Creates a new MutableTreeNodeImpl object. Both the name and value are left undefined.
      • MutableTreeNodeImpl

        public MutableTreeNodeImpl​(java.lang.String name)
        Creates a new MutableTreeNodeImpl object. The name is defined here, but the value is not.
        Parameters:
        name - The name of the node.
      • MutableTreeNodeImpl

        public MutableTreeNodeImpl​(java.lang.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.
    • Method Detail

      • setName

        public void setName​(java.lang.String name)
        Description copied from interface: MutableTreeNode
        Sets the name associated with this node.
        Specified by:
        setName in interface MutableTreeNode<T>
        Parameters:
        name - The name to associate with this node.
      • setValue

        public void setValue​(T value)
        Description copied from interface: MutableTreeNode
        Sets the value associated with this node.
        Specified by:
        setValue in interface MutableTreeNode<T>
        Parameters:
        value - The value to associate with this node.
      • add

        public void add​(MutableTreeNode<T> treeNode,
                        int index)
                 throws java.lang.IllegalArgumentException,
                        java.lang.ArrayIndexOutOfBoundsException
        Description copied from interface: MutableTreeNode
        Adds a node as a child of this node at a specified position.
        Specified by:
        add in interface MutableTreeNode<T>
        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

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

        public MutableTreeNode<T> remove​(int index)
                                  throws java.lang.ArrayIndexOutOfBoundsException
        Description copied from interface: MutableTreeNode
        Removes a child at a specific index.
        Specified by:
        remove in interface MutableTreeNode<T>
        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.