Ignore:
Timestamp:
06/03/14 15:12:11 (11 years ago)
Author:
wojtekp
Message:
 
File:
1 moved

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/phases/ExecutionProfile.java

    r1207 r1362  
    33import java.util.LinkedList; 
    44 
    5 public class ResourceConsumptionProfile { 
     5public class ExecutionProfile { 
    66         
    77        protected LinkedList<ResourceConsumption> resourceConsumptionList; 
    88        protected long usefulWork; 
    99        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) { 
    1712                this.resourceConsumptionList = resourceConsumptionList; 
    18                 this.currentPhase = -1; 
     13                this.currentPhase = 0; 
    1914        } 
    2015         
     
    2419         
    2520        public ResourceConsumption getCurrentResourceConsumption(){ 
    26                 if(currentPhase < resourceConsumptionList.size()) 
    27                         return resourceConsumptionList.get(currentPhase); 
    28                 else  
    29                         return null; 
     21                return resourceConsumptionList.get(currentPhase); 
    3022        } 
    3123 
     
    4537                this.usefulWork = usefulWork; 
    4638        } 
     39         
     40        public boolean isLast(){ 
     41                if(currentPhase == resourceConsumptionList.size() - 1){ 
     42                        return true; 
     43                } 
     44                return false; 
     45        } 
    4746} 
Note: See TracChangeset for help on using the changeset viewer.