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 java.lang.ObjectHelper 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 Constructor Description AssociationTo1Helper()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TgetTargetInternal(S sourceObject)Returns the targetIModelObjectby following a 1-to-1 association from the givensource object.java.util.List<? extends T>getTargets(java.util.List<? extends S> sourceObjects)Returns aListof targetmodel objectsfound by callinggetTargetInternal(IModelObject)for every object in thesourceObjectsList.
-
-
-
Method Detail
-
getTargets
public java.util.List<? extends T> getTargets(java.util.List<? extends S> sourceObjects)
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
protected abstract T getTargetInternal(S sourceObject)
Returns the targetIModelObjectby following a 1-to-1 association from the givensource object.- Parameters:
sourceObject- theIModelObjectsource for the association- Returns:
- the target
IModelObject
-
-