public class Tree extends 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,
Collection<FunctionNode> functions,
Collection<IdentifierNode> identifiers,
boolean deferred)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Bindings |
bind(FunctionMapper fnMapper,
VariableMapper varMapper)
Create a bindings.
|
Bindings |
bind(FunctionMapper fnMapper,
VariableMapper varMapper,
TypeConverter converter)
Create a bindings.
|
Iterable<FunctionNode> |
getFunctionNodes()
Get function nodes (in no particular order)
|
Iterable<IdentifierNode> |
getIdentifierNodes()
Get identifier nodes (in no particular order)
|
ExpressionNode |
getRoot() |
boolean |
isDeferred() |
String |
toString() |
public Tree(ExpressionNode root, Collection<FunctionNode> functions, Collection<IdentifierNode> identifiers, boolean deferred)
root
- root nodefunctions
- collection of function nodesidentifiers
- collection of identifier nodespublic Iterable<FunctionNode> getFunctionNodes()
public Iterable<IdentifierNode> getIdentifierNodes()
public ExpressionNode getRoot()
public boolean isDeferred()
public Bindings bind(FunctionMapper fnMapper, VariableMapper varMapper)
fnMapper
- the function mapper to usevarMapper
- the variable mapper to usepublic Bindings bind(FunctionMapper fnMapper, VariableMapper varMapper, TypeConverter converter)
fnMapper
- the function mapper to usevarMapper
- the variable mapper to useconverter
- custom type converterCopyright © 2021. All rights reserved.