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()
      • childrenChanged

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

        void addUserAttribute​(String name,
                              Object value)
        Sets a user-defined attribute for the tree node. This allows to assign multiple attributes identified by their names.
        Parameters:
        name - the attribute name
        value - the attribute value
      • getUserAttribute

        <P> P getUserAttribute​(String name,
                               Class<P> clazz)
        Obtains the user-defined attribute value assigned to the node.
        Parameters:
        name - the attribute name
        clazz - the class of the required attribute
        Returns:
        an object of the given class representing the value of the attribute (application-specific) or null when no such attribute is present.