@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; }
@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(); }
@Override public Collection<? extends IExecutable> getAspects() { return aspects.values(); }
@Override public Collection<ActionStatement> getActions() { return actions.values(); }
@Override public Collection<UserCommandStatement> getUserCommands() { return userCommands.values(); }
@Override public Collection<IVariable> getVars() { return variables.values(); }
@Override public boolean containMicroSpecies(final ISpecies species) { final ISpecies parentSpecies = this.getParentSpecies(); return microSpecies.values().contains(species) || (parentSpecies != null ? parentSpecies.containMicroSpecies(species) : false); }