Interface GenericTreeNode<T extends GenericTreeNode<T>>

    • Method Detail

      • getParent

        T getParent()
      • setParent

        void setParent​(T parent)
      • getRoot

        T getRoot()
      • setRoot

        void setRoot​(T root)
      • isRoot

        boolean isRoot()
      • getChildren

        List<T> getChildren()
      • getChildCount

        int getChildCount()
      • isLeaf

        boolean isLeaf()
      • appendChild

        void appendChild​(T child)
      • appendChildren

        void appendChildren​(List<T> children)
      • removeAllChildren

        void removeAllChildren()
      • getIndex

        int getIndex​(T child)
      • getPreviousSibling

        T getPreviousSibling()
      • getNextSibling

        T getNextSibling()
      • getDepth

        int getDepth()
      • getLeafCount

        int getLeafCount()
      • findNodesPreOrder

        List<T> findNodesPreOrder​(Predicate<T> predicate)
        Traverses the tree rooted in this node preorder and finds all nodes by a predicate.
        Parameters:
        predicate - The predicate to test or null when all nodes should be returned.
        Returns:
        The list of nodes found.
      • findNodesPostOrder

        List<T> findNodesPostOrder​(Predicate<T> predicate)
        Traverses the tree rooted in this node postorder and finds all nodes by a predicate.
        Parameters:
        predicate - The predicate to test or null when all nodes should be returned.
        Returns:
        The list of nodes found.
      • childrenChanged

        void childrenChanged()
        Signals that some children have been added or removed or their state changed.