Class ExpressionTree


  • public class ExpressionTree
    extends java.lang.Object
    The class describes an object contains an expression tree
    • Method Detail

      • isEmpty

        public boolean isEmpty()
        Allows to check that the tree is empty
        Returns:
        true if the tree is empty one else false
      • addItem

        public void addItem​(ExpressionItem item)
        Add new expression item into tree
        Parameters:
        item - an item to be added, must not be null
      • addTree

        public void addTree​(ExpressionTree tree)
        Add whole tree as a tree element, also it sets the maximum priority to the new element
        Parameters:
        tree - a tree to be added as an item, must not be null
      • getRoot

        public ExpressionTreeElement getRoot()
        Get the root of the tree
        Returns:
        the root of the tree or EMPTY_SLOT if the tree is empty
      • postProcess

        public void postProcess()
        It can be called after the tree has been formed to optimize inside structures