Package org.faktorips.runtime.formula
Class FormulaEvaluatorUtil.AssociationTo1Helper<S extends IModelObject,T extends IModelObject>
java.lang.Object
org.faktorips.runtime.formula.FormulaEvaluatorUtil.AssociationTo1Helper<S,T>
- Type Parameters:
S- the type of the source objectsT- the type of the association targets
- Enclosing class:
- FormulaEvaluatorUtil
public abstract static class FormulaEvaluatorUtil.AssociationTo1Helper<S extends IModelObject,T extends IModelObject>
extends Object
Helper class for navigating 1-to-1 associations from a list of source objects of type
<S> to target objects of type <T>.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract TgetTargetInternal(S sourceObject) Returns the targetIModelObjectby following a 1-to-1 association from the givensource object.getTargets(List<? extends S> sourceObjects) Returns aListof targetmodel objectsfound by callinggetTargetInternal(IModelObject)for every object in thesourceObjectsList.
-
Constructor Details
-
AssociationTo1Helper
public AssociationTo1Helper()
-
-
Method Details
-
getTargets
Returns aListof targetmodel objectsfound by callinggetTargetInternal(IModelObject)for every object in thesourceObjectsList.- Parameters:
sourceObjects- themodel objectson whichgetTargetInternal(IModelObject)will be called- Returns:
- a
Listof targetmodel objects
-
getTargetInternal
Returns the targetIModelObjectby following a 1-to-1 association from the givensource object.- Parameters:
sourceObject- theIModelObjectsource for the association- Returns:
- the target
IModelObject
-