Changeset 896 for DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ResourceConsumptionProfile.java
- Timestamp:
- 03/04/13 08:25:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ResourceConsumptionProfile.java
r883 r896 1 1 package schedframe.scheduling.tasks.phases; 2 2 3 import java.util. ArrayList;3 import java.util.LinkedList; 4 4 import java.util.List; 5 5 6 6 public class ResourceConsumptionProfile { 7 7 8 protected List<ResourceConsumption> resourceConsumptionList; 8 protected LinkedList<ResourceConsumption> resourceConsumptionList; 9 protected int currentPhase; 9 10 10 11 public ResourceConsumptionProfile() { 11 this.resourceConsumptionList = new ArrayList<ResourceConsumption>(); 12 this.resourceConsumptionList = new LinkedList<ResourceConsumption>(); 13 this.currentPhase = -1; 12 14 } 13 15 14 public ResourceConsumptionProfile(Li st<ResourceConsumption> resourceConsumptionList) {16 public ResourceConsumptionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { 15 17 this.resourceConsumptionList = resourceConsumptionList; 18 this.currentPhase = -1; 19 } 20 21 public LinkedList<ResourceConsumption> getResourceConsumptionList(){ 22 return resourceConsumptionList; 23 } 24 25 public ResourceConsumption getCurrentResourceConsumption(){ 26 if(currentPhase < resourceConsumptionList.size()) 27 return resourceConsumptionList.get(currentPhase); 28 else 29 return null; 30 } 31 32 public int getCurrentPhase() { 33 return currentPhase; 34 } 35 36 public void setCurrentPhase(int currentPhase) { 37 this.currentPhase = currentPhase; 16 38 } 17 39 }
Note: See TracChangeset
for help on using the changeset viewer.