Пример #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;
 }
Пример #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();
 }
Пример #3
0
 @Override
 public Collection<? extends IExecutable> getAspects() {
   return aspects.values();
 }
Пример #4
0
 @Override
 public Collection<ActionStatement> getActions() {
   return actions.values();
 }
Пример #5
0
 @Override
 public Collection<UserCommandStatement> getUserCommands() {
   return userCommands.values();
 }
Пример #6
0
 @Override
 public Collection<IVariable> getVars() {
   return variables.values();
 }
Пример #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);
 }