net.sf.oval.expression
Interface ExpressionLanguage

All Known Implementing Classes:
ExpressionLanguageBeanShellImpl, ExpressionLanguageGroovyImpl, ExpressionLanguageJavaScriptImpl, ExpressionLanguageJEXLImpl, ExpressionLanguageJRubyImpl, ExpressionLanguageMVELImpl, ExpressionLanguageOGNLImpl, ExpressionLanguageScriptEngineImpl

public interface ExpressionLanguage

Author:
Sebastian Thomschke

Method Summary
 Object evaluate(String expression, Map<String,?> values)
          Evaluates the given expression.
 boolean evaluateAsBoolean(String expression, Map<String,?> values)
          Evaluates the given expression and expects it to return a boolean.
 

Method Detail

evaluate

Object evaluate(String expression,
                Map<String,?> values)
                throws ExpressionEvaluationException
Evaluates the given expression.

Parameters:
expression - the expression to evaluate
values - context values passed to the interpreter
Returns:
the result of the expression evaluation
Throws:
ExpressionEvaluationException - in case of an invalid expression

evaluateAsBoolean

boolean evaluateAsBoolean(String expression,
                          Map<String,?> values)
                          throws ExpressionEvaluationException
Evaluates the given expression and expects it to return a boolean.

Parameters:
expression - the expression to evaluate
values - context values passed to the interpreter
Returns:
the result of the expression evaluation
Throws:
ExpressionEvaluationException - If an error during evaluation occurs or if the return value is not a boolean value.


Copyright © 2005-2013 The OVal Development Team. All Rights Reserved.