Changeset 1362 for DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ExecutionProfile.java
- Timestamp:
- 06/03/14 15:12:11 (11 years ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ExecutionProfile.java
r1207 r1362 3 3 import java.util.LinkedList; 4 4 5 public class ResourceConsumptionProfile {5 public class ExecutionProfile { 6 6 7 7 protected LinkedList<ResourceConsumption> resourceConsumptionList; 8 8 protected long usefulWork; 9 9 private int currentPhase; 10 11 public ResourceConsumptionProfile() { 12 this.resourceConsumptionList = new LinkedList<ResourceConsumption>(); 13 this.currentPhase = -1; 14 } 15 16 public ResourceConsumptionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { 10 11 public ExecutionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { 17 12 this.resourceConsumptionList = resourceConsumptionList; 18 this.currentPhase = -1;13 this.currentPhase = 0; 19 14 } 20 15 … … 24 19 25 20 public ResourceConsumption getCurrentResourceConsumption(){ 26 if(currentPhase < resourceConsumptionList.size()) 27 return resourceConsumptionList.get(currentPhase); 28 else 29 return null; 21 return resourceConsumptionList.get(currentPhase); 30 22 } 31 23 … … 45 37 this.usefulWork = usefulWork; 46 38 } 39 40 public boolean isLast(){ 41 if(currentPhase == resourceConsumptionList.size() - 1){ 42 return true; 43 } 44 return false; 45 } 47 46 }
Note: See TracChangeset
for help on using the changeset viewer.