org.faktorips.runtime.formula
Class FormulaEvaluatorUtil.AssociationTo1Helper<S extends IModelObject,T extends IModelObject>

java.lang.Object
  extended by org.faktorips.runtime.formula.FormulaEvaluatorUtil.AssociationTo1Helper<S,T>
Type Parameters:
S - the type of the source objects
T - 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
FormulaEvaluatorUtil.AssociationTo1Helper()
           
 
Method Summary
protected abstract  T getTargetInternal(S sourceObject)
          Returns the target IModelObject by following a 1-to-1 association from the given source object.
 List<? extends T> getTargets(List<? extends S> sourceObjects)
          Returns a List of target model objects found by calling getTargetInternal(IModelObject) for every object in the sourceObjects List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormulaEvaluatorUtil.AssociationTo1Helper

public FormulaEvaluatorUtil.AssociationTo1Helper()
Method Detail

getTargets

public List<? extends T> getTargets(List<? extends S> sourceObjects)
Returns a List of target model objects found by calling getTargetInternal(IModelObject) for every object in the sourceObjects List.

Parameters:
sourceObjects - the model objects on which getTargetInternal(IModelObject) will be called
Returns:
a List of target model objects

getTargetInternal

protected abstract T getTargetInternal(S sourceObject)
Returns the target IModelObject by following a 1-to-1 association from the given source object.

Parameters:
sourceObject - the IModelObject source for the association
Returns:
the target IModelObject


Copyright © 2015. All rights reserved.