Line | |
---|
1 | package schedframe.scheduling.tasks.phases; |
---|
2 | |
---|
3 | import java.util.LinkedList; |
---|
4 | |
---|
5 | public class ExecutionProfile { |
---|
6 | |
---|
7 | protected LinkedList<ResourceConsumption> resourceConsumptionList; |
---|
8 | protected long usefulWork; |
---|
9 | private int currentPhase; |
---|
10 | |
---|
11 | public ExecutionProfile(LinkedList<ResourceConsumption> resourceConsumptionList) { |
---|
12 | this.resourceConsumptionList = resourceConsumptionList; |
---|
13 | this.currentPhase = 0; |
---|
14 | } |
---|
15 | |
---|
16 | public LinkedList<ResourceConsumption> getResourceConsumptionList(){ |
---|
17 | return resourceConsumptionList; |
---|
18 | } |
---|
19 | |
---|
20 | public ResourceConsumption getCurrentResourceConsumption(){ |
---|
21 | return resourceConsumptionList.get(currentPhase); |
---|
22 | } |
---|
23 | |
---|
24 | public int getCurrentPhase() { |
---|
25 | return currentPhase; |
---|
26 | } |
---|
27 | |
---|
28 | public void setCurrentPhase(int currentPhase) { |
---|
29 | this.currentPhase = currentPhase; |
---|
30 | } |
---|
31 | |
---|
32 | public long getUsefulWork() { |
---|
33 | return usefulWork; |
---|
34 | } |
---|
35 | |
---|
36 | public void setUsefulWork(long usefulWork) { |
---|
37 | this.usefulWork = usefulWork; |
---|
38 | } |
---|
39 | |
---|
40 | public boolean isLast(){ |
---|
41 | if(currentPhase == resourceConsumptionList.size() - 1){ |
---|
42 | return true; |
---|
43 | } |
---|
44 | return false; |
---|
45 | } |
---|
46 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.