final Map<HoursGroup, Map<Criterion, Boolean>> mapHoursGroup =
createHoursGroupCriterionMap(originalIndirectCriterionRequirements);
for (T each: orderElements) {
IndirectCriterionRequirement indirect = IndirectCriterionRequirement
.create(parent, criterion);
if (isOrderLine(each)) {
for (HoursGroup hoursGroup: myHoursGroups(toOrderLine(each))) {
Map<Criterion, Boolean> criterionMap = mapHoursGroup.get(hoursGroup.getOrigin());
if (criterionMap != null) {
final Boolean valid = criterionMap.get(indirect.getCriterion());
indirect.setValid(valid);
}
hoursGroup.addCriterionRequirement(indirect);
}
}