Changeset 211 for xssim/trunk/src


Ignore:
Timestamp:
04/06/12 11:01:36 (13 years ago)
Author:
wojtekp
Message:
 
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; 
     1package test.rewolucja.resources.logical.base; 
    22 
    33import eduni.simjava.Sim_event; 
     
    3838        protected ManagementSystem managementSystem; 
    3939         
    40         protected List<ComputingResource> resources; 
     40        protected List<ComputingResource> compResources; 
    4141         
    4242        protected LogicalResource parent; 
     
    4848                super(manSys.getName(), 1); 
    4949                this.managementSystem = manSys; 
    50                 this.resources = new ArrayList<ComputingResource>(); 
     50                this.compResources = new ArrayList<ComputingResource>(); 
    5151                this.status = ResourceStatus.AVAILABLE; 
    5252                init(); 
     
    5656                super(manSys.getName(), 1); 
    5757                this.managementSystem = manSys; 
    58                 this.resources = new ArrayList<ComputingResource>(); 
     58                this.compResources = new ArrayList<ComputingResource>(); 
    5959                this.status = ResourceStatus.AVAILABLE; 
    6060                addResources(res); 
     
    9797 
    9898        public void addResource(ComputingResource resource) { 
    99                 resources.add(resource); 
     99                compResources.add(resource); 
    100100        } 
    101101 
    102102        public void addResources(List<ComputingResource> res) { 
    103103                for(ComputingResource resource:res){ 
    104                         resources.add(resource); 
     104                        compResources.add(resource); 
    105105                        resource.setLogicalResource(this); 
    106106                        for(ComputingResource child: resource.filterDescendants(new Properties())){ 
     
    111111 
    112112        public List<ComputingResource> getResources() { 
    113                 return resources; 
     113                return compResources; 
    114114        } 
    115115 
     
    238238        public LogicalResource getLogicalResource(String resourceName){ 
    239239                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); 
    242242                        if(resource.getName().equals(resourceName)) 
    243243                                resourceWithName = resource; 
Note: See TracChangeset for help on using the changeset viewer.