Changeset 211 for xssim/trunk/src
- Timestamp:
- 04/06/12 11:01:36 (13 years ago)
- Location:
- xssim/trunk/src/test/rewolucja/resources/logical/base
- Files:
-
- 1 added
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
xssim/trunk/src/test/rewolucja/resources/logical/base/LogicalResource.java
r188 r211 1 package test.rewolucja.resources.logical ;1 package test.rewolucja.resources.logical.base; 2 2 3 3 import eduni.simjava.Sim_event; … … 38 38 protected ManagementSystem managementSystem; 39 39 40 protected List<ComputingResource> resources;40 protected List<ComputingResource> compResources; 41 41 42 42 protected LogicalResource parent; … … 48 48 super(manSys.getName(), 1); 49 49 this.managementSystem = manSys; 50 this. resources = new ArrayList<ComputingResource>();50 this.compResources = new ArrayList<ComputingResource>(); 51 51 this.status = ResourceStatus.AVAILABLE; 52 52 init(); … … 56 56 super(manSys.getName(), 1); 57 57 this.managementSystem = manSys; 58 this. resources = new ArrayList<ComputingResource>();58 this.compResources = new ArrayList<ComputingResource>(); 59 59 this.status = ResourceStatus.AVAILABLE; 60 60 addResources(res); … … 97 97 98 98 public void addResource(ComputingResource resource) { 99 resources.add(resource);99 compResources.add(resource); 100 100 } 101 101 102 102 public void addResources(List<ComputingResource> res) { 103 103 for(ComputingResource resource:res){ 104 resources.add(resource);104 compResources.add(resource); 105 105 resource.setLogicalResource(this); 106 106 for(ComputingResource child: resource.filterDescendants(new Properties())){ … … 111 111 112 112 public List<ComputingResource> getResources() { 113 return resources;113 return compResources; 114 114 } 115 115 … … 238 238 public LogicalResource getLogicalResource(String resourceName){ 239 239 ComputingResource resourceWithName = null; 240 for(int i = 0 ; i < resources.size() && resourceWithName == null; i++){241 ComputingResource resource = resources.get(i);240 for(int i = 0 ; i < compResources.size() && resourceWithName == null; i++){ 241 ComputingResource resource = compResources.get(i); 242 242 if(resource.getName().equals(resourceName)) 243 243 resourceWithName = resource;
Note: See TracChangeset
for help on using the changeset viewer.