Ignore:
Timestamp:
11/26/13 11:56:07 (11 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/simulator/reader/EnvironmentWrapper.java

    r477 r1207  
    1818public class EnvironmentWrapper { 
    1919 
    20         Environment environment; 
     20        private Environment environment; 
    2121 
    2222        public void wrap(Environment environment) { 
     
    5353        public ComputingResource[] getComputingResources() throws UnknownParameter{ 
    5454                 
    55                 ArrayList<ComputingResource>tab = null; 
    56                  
    5755                if(environment == null) 
    5856                        throw new UnknownParameter("Environment parameters are not defined."); 
     
    6159                        return null; 
    6260                 
    63                 tab = new ArrayList<ComputingResource>(); 
     61                ArrayList<ComputingResource> computingResources = new ArrayList<ComputingResource>(); 
    6462                  
    6563                for(int i = 0; i < resources.getComputingResourceCount(); i++){ 
    6664                        ComputingResource compRes = resources.getComputingResource(i); 
    67                         tab.add(compRes); 
     65                        computingResources.add(compRes); 
    6866                } 
    69                 if(tab.size() == 0) 
     67                if(computingResources.size() == 0) 
    7068                        return null; 
    7169                else 
    72                         return tab.toArray(new ComputingResource[0]); 
     70                        return computingResources.toArray(new ComputingResource[0]); 
    7371        } 
    7472         
Note: See TracChangeset for help on using the changeset viewer.