Interface ITreeNode<T>

  • Type Parameters:
    T - the generic type
    All Superinterfaces:
    javax.swing.tree.TreeModel
    All Known Implementing Classes:
    AbstractGenericTreeNode

    public interface ITreeNode<T>
    extends javax.swing.tree.TreeModel
    The Interface ITreeNode.
    • Method Detail

      • addChild

        void addChild​(ITreeNode<T> child)
        Adds the child.
        Parameters:
        child - the child
      • addChildAt

        void addChildAt​(int index,
                        ITreeNode<T> child)
                 throws java.lang.IndexOutOfBoundsException
        Adds the child.
        Parameters:
        index - the index
        child - the child
        Throws:
        java.lang.IndexOutOfBoundsException - the index out of bounds exception
      • equals

        boolean equals​(ITreeNode<T> treeNode)
        Equals.
        Parameters:
        treeNode - the tree node
        Returns:
        true, if successful
      • getChildCount

        int getChildCount()
        Gets the child count.
        Returns:
        the child count
      • getChildren

        java.util.List<ITreeNode<T>> getChildren()
        Gets the children.
        Returns:
        the children
      • getValue

        T getValue()
        Gets the value.
        Returns:
        the value
      • hasChildren

        boolean hasChildren()
        Checks for children.
        Returns:
        true, if successful
      • isLeaf

        boolean isLeaf()
        Checks if is leaf.
        Returns:
        true, if is leaf
      • isNode

        boolean isNode()
        Checks if is node.
        Returns:
        true, if is node
      • removeChild

        void removeChild​(ITreeNode<T> child)
        Removes the child.
        Parameters:
        child - the child
      • removeChildAt

        void removeChildAt​(int index)
                    throws java.lang.IndexOutOfBoundsException
        Removes the child.
        Parameters:
        index - the index
        Throws:
        java.lang.IndexOutOfBoundsException - the index out of bounds exception
      • setChildren

        void setChildren​(java.util.List<ITreeNode<T>> children)
        Sets the children.
        Parameters:
        children - the new children
      • setValue

        void setValue​(T value)
        Sets the value.
        Parameters:
        value - the new value
      • toList

        java.util.List<ITreeNode<T>> toList()
        To list.
        Returns:
        the list
      • traverse

        void traverse​(ITreeNode<T> node,
                      java.util.List<ITreeNode<T>> list)
        Traverse.
        Parameters:
        node - the node
        list - the list