public class Tree
extends java.lang.Object
TreeBuilder.
The bind(FunctionMapper, VariableMapper) method is used to create
Bindings, which are needed at evaluation time to
lookup functions and variables. The tree itself does not contain such information,
because it would make the tree depend on the function/variable mapper supplied at
parse time.| Constructor and Description |
|---|
Tree(ExpressionNode root,
java.util.Collection<FunctionNode> functions,
java.util.Collection<IdentifierNode> identifiers,
boolean deferred)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Bindings |
bind(FunctionMapper fnMapper,
VariableMapper varMapper)
Create a bindings.
|
java.lang.Iterable<FunctionNode> |
getFunctionNodes()
Get function nodes (in no particular order)
|
java.lang.Iterable<IdentifierNode> |
getIdentifierNodes()
Get identifier nodes (in no particular order)
|
ExpressionNode |
getRoot() |
boolean |
isDeferred() |
java.lang.String |
toString() |
public Tree(ExpressionNode root, java.util.Collection<FunctionNode> functions, java.util.Collection<IdentifierNode> identifiers, boolean deferred)
root - root nodefunctions - collection of function nodesidentifiers - collection of identifier nodespublic java.lang.Iterable<FunctionNode> getFunctionNodes()
public java.lang.Iterable<IdentifierNode> getIdentifierNodes()
public ExpressionNode getRoot()
public boolean isDeferred()
public java.lang.String toString()
toString in class java.lang.Objectpublic Bindings bind(FunctionMapper fnMapper, VariableMapper varMapper)
fnMapper - the function mapper to usevarMapper - the variable mapper to use