org.faktorips.runtime.formula
Interface IFormulaEvaluator

All Known Implementing Classes:
AbstractFormulaEvaluator

public interface IFormulaEvaluator

Evaluates 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 an IFormulaEvaluatorFactory.

Author:
dirmeier

Method Summary
 Object evaluate(String formularName, Object... parameters)
          Evaluates the formula with the given name and the specified parameters.
 Map<String,String> getNameToExpressionMap()
          Returns a defensive copy of the map of expressions/formulas held by this evaluator.
 Object getObject()
          Returns the product component generation or product component this is an evaluator for.
 

Method Detail

getObject

Object getObject()
Returns the product component generation or product component this is an evaluator for.


evaluate

Object evaluate(String formularName,
                Object... parameters)
Evaluates the formula with the given name and the specified parameters.

Parameters:
formularName - The name of the formula to evaluate
parameters - the parameters the formula requires when being evaluated
Returns:
the result of the evaluated formula

getNameToExpressionMap

Map<String,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


Copyright © 2015. All rights reserved.