Class AbstractBottomUpTreeNode

    • Constructor Detail

      • AbstractBottomUpTreeNode

        public AbstractBottomUpTreeNode​(List<TreeNode> children)
        Create a new instance of a AbstractBottomUpTreeNode.
        Parameters:
        children - child nodes to be linked to this node.
      • AbstractBottomUpTreeNode

        public AbstractBottomUpTreeNode​(TreeNode... children)
        Create a new instance of a AbstractBottomUpTreeNode.
        Parameters:
        children - child nodes to be linked to this node.
    • Method Detail

      • getRoot

        public TreeNode getRoot()
        Description copied from interface: TreeNode
        Get the root of the tree
        Returns:
        root node
      • addChild

        public void addChild​(TreeNode child)
        Description copied from interface: TreeNode
        Add a child node below this node. Children are registered in the order in which they are added.

        Important: this also automatically creates a link in the opposite direction. All implementations must adhere to this rule.

        Parameters:
        child - child node
      • setParent

        public void setParent​(TreeNode parent)
        Description copied from interface: TreeNode
        Set a parent for this node.
        Parameters:
        parent - a node to set as a parent