Changeset 1522
- Timestamp:
- 02/21/2012 11:05:44 AM (3 months ago)
- Location:
- libs/cmion/cmionMain/src/cmion
- Files:
-
- 2 modified
-
level3/MindAction.java (modified) (4 diffs)
-
storage/CmionStorageContainer.java (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libs/cmion/cmionMain/src/cmion/level3/MindAction.java
r1017 r1522 31 31 32 32 import java.util.ArrayList; 33 import java.util.List; 33 34 import java.util.HashMap; 34 35 … … 43 44 /** create a new mind action with the specified name and parameters, if the action has 44 45 * no parameters, the second parameter of this constructor may be null*/ 45 public MindAction(String subject, String name, ArrayList<String> parameters)46 public MindAction(String subject, String name, List<String> parameters) 46 47 { 47 48 this.subject = subject; … … 171 172 172 173 /** the parameters of this action */ 173 protected ArrayList<String> parameters;174 protected List<String> parameters; 174 175 175 176 /** returns the name/identifier of this action */ … … 186 187 187 188 /** returns the parameters of this action */ 188 public ArrayList<String> getParameters()189 public List<String> getParameters() 189 190 { 190 191 return parameters; -
libs/cmion/cmionMain/src/cmion/storage/CmionStorageContainer.java
r1444 r1522 353 353 container.requestSetProperty(propertyName, initialProperties.get(propertyName)); 354 354 } 355 } 355 } 356 else if (initialProperties!=null) // the container already exists, however we will still add the properties 357 { 358 CmionStorageContainer container = subContainers.get(name); 359 360 // don't do this if the conatainer types don't match 361 if (!type.equals(container.getContainerType())) return; 362 363 // go through all properties and set them 364 for (String propertyName : initialProperties.keySet()) 365 { 366 if (persistentProperties!=null) 367 { 368 boolean persistent = persistentProperties.contains(propertyName); 369 container.requestSetProperty(propertyName, initialProperties.get(propertyName),persistent); 370 } 371 else 372 container.requestSetProperty(propertyName, initialProperties.get(propertyName)); 373 } 374 } 356 375 } 357 376 … … 508 527 // create an array list for remembering the properties that were 509 528 // requested to change during this simulation step 510 ArrayList<String> propertiesSet = new ArrayList<String>();529 HashSet<String> propertiesSet = new HashSet<String>(); 511 530 512 531 // iterate through requests
