DATA - DATA_VARIABLE - public interface IEvaluator<DATA,DATA_VARIABLE>
java.lang.Object based evaluation engines
(typicaly implemented as IASTVisitors). For example the
ComplexEvalVisitor class uses the Complex class
data type.IASTVisitor,
ComplexEvalVisitor| Modifier and Type | Method and Description |
|---|---|
void |
clearVariables()
Clear all defined variables for this evaluator.
|
void |
defineVariable(String variableName,
BooleanVariable value)
Define a boolean value for a given variable name.
|
void |
defineVariable(String variableName,
DATA_VARIABLE value)
Define a value for a given variable name.
|
DATA |
evaluateNode(ASTNode node)
Evaluate an already parsed in abstract syntax tree node into a
DATA value. |
DATA_VARIABLE |
getVariable(String variableName)
Returns the data variable value to which the specified variableName is
mapped, or
null if this map contains no mapping for the
variableName. |
ASTNode |
optimizeFunction(FunctionNode functionNode)
Optimize an already parsed in
functionNode into an
ASTNode. |
void clearVariables()
void defineVariable(String variableName, BooleanVariable value)
variableName - value - void defineVariable(String variableName, DATA_VARIABLE value)
variableName - value - DATA evaluateNode(ASTNode node)
DATA value.node - abstract syntax tree nodeDATA_VARIABLE getVariable(String variableName)
null if this map contains no mapping for the
variableName.variableName - ASTNode optimizeFunction(FunctionNode functionNode)
functionNode into an
ASTNode.functionNode - Copyright © 2015. All rights reserved.