diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/GenericResourceAllocation.java b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/GenericResourceAllocation.java index f8501baa9..58341acae 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/GenericResourceAllocation.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/GenericResourceAllocation.java @@ -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 resources; @@ -194,7 +190,7 @@ public class GenericResourceAllocation extends ResourceAllocation { } - public IAllocation forResources(Collection resources) { + public IAllocatable forResources(Collection resources) { return new Allocation(new ArrayList(resources)); } diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/IAllocatable.java b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/IAllocatable.java new file mode 100644 index 000000000..261b1cb2c --- /dev/null +++ b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/IAllocatable.java @@ -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 + */ +public interface IAllocatable { + public void allocate(ResourcesPerDay resourcesPerDay); +} \ No newline at end of file