ItEr26S07CUAsignacionGrupoRecursosAPlanificacionItEr25S07: Moving interface to top level and renaming it to a better name

This commit is contained in:
Óscar González Fernández 2009-09-15 17:55:39 +02:00
parent 664637e3fb
commit 1dd2fdef91
2 changed files with 12 additions and 6 deletions

View file

@ -85,11 +85,7 @@ public class GenericResourceAllocation extends ResourceAllocation {
return Collections.unmodifiableSet(criterions);
}
public interface IAllocation {
public void allocate(ResourcesPerDay resourcesPerDay);
}
private class Allocation implements IAllocation {
private class Allocation implements IAllocatable {
private final List<Resource> resources;
@ -194,7 +190,7 @@ public class GenericResourceAllocation extends ResourceAllocation {
}
public IAllocation forResources(Collection<? extends Resource> resources) {
public IAllocatable forResources(Collection<? extends Resource> resources) {
return new Allocation(new ArrayList<Resource>(resources));
}

View file

@ -0,0 +1,10 @@
package org.navalplanner.business.planner.entities;
/**
* This interface represents an object that can be do an allocation based on an
* amount of {@link ResourcesPerDay}
* @author Óscar González Fernández <ogonzalez@igalia.com>
*/
public interface IAllocatable {
public void allocate(ResourcesPerDay resourcesPerDay);
}