- Timestamp:
- 03/04/13 08:25:34 (12 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ResourceConsumption.java
r883 r896 51 51 } 52 52 53 public void setReferenceHardware(String referenceHardware) {54 this.referenceHardware = referenceHardware;55 }56 57 53 public long getDuration() { 58 54 return duration; 59 }60 61 public void setDuration(long duration) {62 this.duration = duration;63 55 } 64 56 … … 67 59 } 68 60 69 public void setBehaviourList(List<PhaseBehaviour> behaviourList) {70 this.phaseBehaviourList = behaviourList;71 }72 61 } -
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.