- Timestamp:
- 11/26/13 11:56:07 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/simulator/reader/EnvironmentWrapper.java
r477 r1207 18 18 public class EnvironmentWrapper { 19 19 20 Environment environment;20 private Environment environment; 21 21 22 22 public void wrap(Environment environment) { … … 53 53 public ComputingResource[] getComputingResources() throws UnknownParameter{ 54 54 55 ArrayList<ComputingResource>tab = null;56 57 55 if(environment == null) 58 56 throw new UnknownParameter("Environment parameters are not defined."); … … 61 59 return null; 62 60 63 tab= new ArrayList<ComputingResource>();61 ArrayList<ComputingResource> computingResources = new ArrayList<ComputingResource>(); 64 62 65 63 for(int i = 0; i < resources.getComputingResourceCount(); i++){ 66 64 ComputingResource compRes = resources.getComputingResource(i); 67 tab.add(compRes);65 computingResources.add(compRes); 68 66 } 69 if( tab.size() == 0)67 if(computingResources.size() == 0) 70 68 return null; 71 69 else 72 return tab.toArray(new ComputingResource[0]);70 return computingResources.toArray(new ComputingResource[0]); 73 71 } 74 72
Note: See TracChangeset
for help on using the changeset viewer.