Package com.igormaznitsa.jcp.expression
Class ExpressionTree
java.lang.Object
com.igormaznitsa.jcp.expression.ExpressionTree
The class describes an object contains an expression tree
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FilePositionInfo[]
private ExpressionTreeElement
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addItem
(ExpressionItem item) Add new expression item into treevoid
addTree
(ExpressionTree tree) Add whole tree as a tree element, also it sets the maximum priority to the new elementgetRoot()
Get the root of the treeboolean
isEmpty()
Allows to check that the tree is emptyvoid
It can be called after the tree has been formed to optimize inside structures
-
Field Details
-
last
-
includeStack
-
sources
-
-
Constructor Details
-
ExpressionTree
public ExpressionTree() -
ExpressionTree
-
-
Method Details
-
isEmpty
public boolean isEmpty()Allows to check that the tree is empty- Returns:
- true if the tree is empty one else false
-
addItem
Add new expression item into tree- Parameters:
item
- an item to be added, must not be null
-
addTree
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
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
-