public class DefaultExpressionEvaluator extends AbstractEvaluator implements ExpressionEvaluator
EvaluatorWithDescriptions.Description
Constructor and Description |
---|
DefaultExpressionEvaluator() |
Modifier and Type | Method and Description |
---|---|
void |
compile() |
Object |
evaluate(EvaluatorData data)
Evaluate with the data passed as parameter.
|
Double |
getAccuracy() |
EvaluatorWithDescriptions.Description[] |
getAvailableFunctions() |
EvaluatorWithDescriptions.Description[] |
getAvailableOperators() |
Code |
getCode() |
Compiler |
getCompiler() |
Interpreter |
getInterpreter() |
LexicalAnalyzer |
getLexer() |
String |
getName()
Get the symbolic name of the evaluator.
|
String |
getSource() |
SymbolTable |
getSymbolTable() |
void |
setAccuracy(Double accuracy) |
void |
setCompiler(Compiler compiler) |
void |
setInterpreter(Interpreter interpreter) |
void |
setLexer(LexicalAnalyzer lexer) |
void |
setSource(String source) |
void |
setSymbolTable(SymbolTable symbolTable) |
getDescription, getFieldsInfo, getSQL
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getDescription, getFieldsInfo, getSQL
public Code getCode()
getCode
in interface ExpressionEvaluator
public void compile()
compile
in interface ExpressionEvaluator
public Object evaluate(EvaluatorData data) throws EvaluatorException
Evaluator
evaluate
in interface Evaluator
EvaluatorException
- if an issue is found while evaluating.
The subclass EvaluatorParseException
is used to indicate
a problem while parsing (malformed expression) rather than a
problem while evaluating.public String getName()
Evaluator
public EvaluatorWithDescriptions.Description[] getAvailableOperators()
getAvailableOperators
in interface EvaluatorWithDescriptions
public EvaluatorWithDescriptions.Description[] getAvailableFunctions()
getAvailableFunctions
in interface EvaluatorWithDescriptions
public SymbolTable getSymbolTable()
getSymbolTable
in interface ExpressionEvaluator
public void setSymbolTable(SymbolTable symbolTable)
setSymbolTable
in interface ExpressionEvaluator
public LexicalAnalyzer getLexer()
getLexer
in interface ExpressionEvaluator
public void setLexer(LexicalAnalyzer lexer)
setLexer
in interface ExpressionEvaluator
public Compiler getCompiler()
getCompiler
in interface ExpressionEvaluator
public void setCompiler(Compiler compiler)
setCompiler
in interface ExpressionEvaluator
public Interpreter getInterpreter()
getInterpreter
in interface ExpressionEvaluator
public void setInterpreter(Interpreter interpreter)
setInterpreter
in interface ExpressionEvaluator
public String getSource()
getSource
in interface ExpressionEvaluator
public void setSource(String source)
setSource
in interface ExpressionEvaluator
public Double getAccuracy()
getAccuracy
in interface ExpressionEvaluator
public void setAccuracy(Double accuracy)
setAccuracy
in interface ExpressionEvaluator