}
Map<Criterion, List<GenericResourceAllocation>> result = new HashMap<Criterion, List<GenericResourceAllocation>>();
for (Entry<Criterion, List<GenericResourceAllocation>> each : map
.entrySet()) {
IAllocationCriteria criteria = and(onInterval(),
new RelatedWith(each.getKey()));
List<ResourceAllocation<?>> replaced = parameters
.getPlanningState().replaceByCurrentOnes(
each.getValue(), criteria);
if (!replaced.isEmpty()) {
result.put(each.getKey(), ResourceAllocation.getOfType(