Package org.faktorips.runtime.formula
Interface IFormulaEvaluator
-
- All Known Implementing Classes:
AbstractFormulaEvaluator
public interface IFormulaEvaluatorEvaluates the formulas of a product component or product component generation. This interface only provides methods to get the configured product component generation and to evaluate already configured formulas. The code of the formulas is set while creating the evaluator by anIFormulaEvaluatorFactory.- Author:
- dirmeier
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Objectevaluate(java.lang.String formularName, java.lang.Object... parameters)Evaluates the formula with the given name and the specified parameters.java.util.Map<java.lang.String,java.lang.String>getNameToExpressionMap()Returns a defensive copy of the map of expressions/formulas held by this evaluator.java.lang.ObjectgetObject()Returns the product component generation or product component this is an evaluator for.
-
-
-
Method Detail
-
getObject
java.lang.Object getObject()
Returns the product component generation or product component this is an evaluator for.
-
evaluate
java.lang.Object evaluate(java.lang.String formularName, java.lang.Object... parameters)Evaluates the formula with the given name and the specified parameters.- Parameters:
formularName- The name of the formula to evaluateparameters- the parameters the formula requires when being evaluated- Returns:
- the result of the evaluated formula
-
getNameToExpressionMap
java.util.Map<java.lang.String,java.lang.String> getNameToExpressionMap()
Returns a defensive copy of the map of expressions/formulas held by this evaluator.- Returns:
- a map containing the expressions (with their names as keys) held by this formula evaluator
-
-