Package com.exasol.util
Class AbstractBottomUpTreeNode
- java.lang.Object
-
- com.exasol.util.AbstractTree
-
- com.exasol.util.AbstractBottomUpTreeNode
-
- All Implemented Interfaces:
TreeNode
- Direct Known Subclasses:
AbstractBooleanExpression,AbstractValueExpression
public abstract class AbstractBottomUpTreeNode extends AbstractTree
This is an abstract base class for nodes in a tree structure.
-
-
Field Summary
-
Fields inherited from class com.exasol.util.AbstractTree
children, parent
-
-
Constructor Summary
Constructors Constructor Description AbstractBottomUpTreeNode(TreeNode... children)Create a new instance of aAbstractBottomUpTreeNode.AbstractBottomUpTreeNode(List<TreeNode> children)Create a new instance of aAbstractBottomUpTreeNode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChild(TreeNode child)Add a child node below this node.TreeNodegetRoot()Get the root of the treevoidsetParent(TreeNode parent)Set a parent for this node.-
Methods inherited from class com.exasol.util.AbstractTree
getChild, getChildren, getParent, isChild, isFirstSibling, isRoot, isSibling
-
-
-
-
Constructor Detail
-
AbstractBottomUpTreeNode
public AbstractBottomUpTreeNode(List<TreeNode> children)
Create a new instance of aAbstractBottomUpTreeNode.- Parameters:
children- child nodes to be linked to this node.
-
AbstractBottomUpTreeNode
public AbstractBottomUpTreeNode(TreeNode... children)
Create a new instance of aAbstractBottomUpTreeNode.- Parameters:
children- child nodes to be linked to this node.
-
-
Method Detail
-
getRoot
public TreeNode getRoot()
Description copied from interface:TreeNodeGet the root of the tree- Returns:
- root node
-
addChild
public void addChild(TreeNode child)
Description copied from interface:TreeNodeAdd 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
-
-