public interface Expression
evaluated.
If you want to evaluate an expression only once, you better use ExpressionEvaluator.evaluate(String, Mapping).Parser.parse()| Modifier and Type | Field and Description |
|---|---|
static Expression |
FALSE
An expression which always evaluates to
false. |
static Expression |
NULL
An expression which always evaluates to
null. |
static Expression |
TRUE
An expression which always evaluates to
true. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
evaluate(Mapping<java.lang.String,?> variables)
Computes the value of the expression
|
java.lang.Object |
evaluateTo(Mapping<java.lang.String,?> variables,
java.lang.Class<?> targetType) |
boolean |
evaluateToBoolean(Mapping<java.lang.String,?> variables) |
java.lang.Object |
evaluateToPrimitive(Mapping<java.lang.String,?> variables,
java.lang.Class<?> targetType) |
static final Expression TRUE
true.static final Expression FALSE
false.static final Expression NULL
null.@Nullable java.lang.Object evaluate(Mapping<java.lang.String,?> variables) throws EvaluationException
variables - The values of the variables that were named when the expression was parsed. Allowed
values are String, Integer, Boolean, any other Object, or null.String, Integer, Boolean, any other Object, or
nullEvaluationException - A problem occurred during evaluation, e.g. a class could not be loaded, or a type
cast could not be performed@Nullable java.lang.Object evaluateTo(Mapping<java.lang.String,?> variables, java.lang.Class<?> targetType) throws EvaluationException
EvaluationExceptionAbstractExpression.evaluateTo(Mapping, Class)java.lang.Object evaluateToPrimitive(Mapping<java.lang.String,?> variables, java.lang.Class<?> targetType) throws EvaluationException
EvaluationExceptionAbstractExpression.evaluateToPrimitive(Mapping, Class)boolean evaluateToBoolean(Mapping<java.lang.String,?> variables) throws EvaluationException
EvaluationExceptionAbstractExpression.evaluateToBoolean(Mapping)