public class ExpressionEvaluator extends Object
| Constructor and Description |
|---|
ExpressionEvaluator(String expression)
Builds this extended expression evaluator
|
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(Map<String,Object> variables)
Evaluates the instance-defined expression with a map of variables.
|
Object |
evaluate(Map<String,Object> variables,
boolean updateSourceMap)
Evaluates the instance-defined expression with a map of variables.
|
static void |
validateExpression(String expression)
Validates the given expression.
|
public ExpressionEvaluator(String expression)
expression - the expression to be used for evaluationpublic static void validateExpression(String expression)
expression - the expression to be validatedpublic Object evaluate(Map<String,Object> variables) throws org.nfunk.jep.ParseException
variables - the map of variables to be used for the evaluationorg.nfunk.jep.ParseException - if for some reason the expression could not be evaluatedpublic Object evaluate(Map<String,Object> variables, boolean updateSourceMap) throws org.nfunk.jep.ParseException
variables - the map of variables to be used for the evaluationupdateSourceMap - a flag indicating whether or not the initial variables map shall
be updated with the evaluation results (default: false)org.nfunk.jep.ParseException - if for some reason the expression could not be evaluatedCopyright © 2020. All rights reserved.