Line | |
---|
1 | package schedframe.scheduling.tasks.phases; |
---|
2 | |
---|
3 | import java.util.LinkedList; |
---|
4 | |
---|
5 | public class ResourceConsumptionProfile { |
---|
6 | |
---|
7 | protected LinkedList<ResourceConsumption> resourceConsumptionList; |
---|
8 | protected long usefulWork; |
---|
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) { |
---|
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; |
---|
38 | } |
---|
39 | |
---|
40 | public long getUsefulWork() { |
---|
41 | return usefulWork; |
---|
42 | } |
---|
43 | |
---|
44 | public void setUsefulWork(long usefulWork) { |
---|
45 | this.usefulWork = usefulWork; |
---|
46 | } |
---|
47 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.