ItEr37S08CUCreacionUnidadesPlanificacionItEr36S11: Completing condition

This commit is contained in:
Óscar González Fernández 2009-12-02 00:47:26 +01:00
parent 953531638c
commit 7af65bb333

View file

@ -65,7 +65,16 @@ public class AggregateOfResourceAllocations {
}
public boolean isEmpty() {
return resourceAllocations.isEmpty();
return resourceAllocations.isEmpty() || allEmpty();
}
private boolean allEmpty() {
for (ResourceAllocation<?> each : resourceAllocations) {
if (each.hasAssignments()) {
return false;
}
}
return true;
}
public List<ResourceAllocation<?>> getAllocationsSortedByStartDate() {