ItEr30S17ValidacionEProbasFuncionais: Changing types of sort function to have a more friendly API

Bug #48
This commit is contained in:
Óscar González Fernández 2009-10-19 00:06:03 +02:00
parent 85fc42fb5a
commit d836543b25

View file

@ -49,10 +49,9 @@ import org.navalplanner.business.resources.entities.Resource;
public abstract class ResourceAllocation<T extends DayAssignment> extends
BaseEntity {
public static List<ResourceAllocation<?>> sortedByStartDate(
Collection<? extends ResourceAllocation<?>> allocations) {
List<ResourceAllocation<?>> result = new ArrayList<ResourceAllocation<?>>(
allocations);
public static <R extends ResourceAllocation<?>> List<R> sortedByStartDate(
Collection<R> allocations) {
List<R> result = new ArrayList<R>(allocations);
Collections.sort(result, byStartDateComparator());
return result;
}