Esempio n. 1
0
 @Override
 public IList<ISpecies> getMicroSpecies() {
   final IList<ISpecies> retVal = GamaListFactory.create(Types.SPECIES);
   retVal.addAll(microSpecies.values());
   final ISpecies parentSpecies = this.getParentSpecies();
   if (parentSpecies != null) {
     retVal.addAll(parentSpecies.getMicroSpecies());
   }
   return retVal;
 }
Esempio n. 2
0
 @Override
 public void dispose() {
   super.dispose();
   for (final IVariable v : variables.values()) {
     v.dispose();
   }
   variables.clear();
   for (final AspectStatement ac : aspects.values()) {
     ac.dispose();
   }
   aspects.clear();
   for (final ActionStatement ac : actions.values()) {
     ac.dispose();
   }
   actions.clear();
   for (final IStatement c : behaviors) {
     c.dispose();
   }
   behaviors.clear();
   macroSpecies = null;
   parentSpecies = null;
   // TODO dispose micro_species first???
   microSpecies.clear();
 }
Esempio n. 3
0
 @Override
 public Collection<? extends IExecutable> getAspects() {
   return aspects.values();
 }
Esempio n. 4
0
 @Override
 public Collection<ActionStatement> getActions() {
   return actions.values();
 }
Esempio n. 5
0
 @Override
 public Collection<UserCommandStatement> getUserCommands() {
   return userCommands.values();
 }
Esempio n. 6
0
 @Override
 public Collection<IVariable> getVars() {
   return variables.values();
 }
Esempio n. 7
0
 @Override
 public boolean containMicroSpecies(final ISpecies species) {
   final ISpecies parentSpecies = this.getParentSpecies();
   return microSpecies.values().contains(species)
       || (parentSpecies != null ? parentSpecies.containMicroSpecies(species) : false);
 }