Package org.biojavax.ga.impl
Class AbstractPopulation
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojavax.ga.impl.AbstractPopulation
- All Implemented Interfaces:
Changeable,Population
- Direct Known Subclasses:
SimplePopulation
Most Population implementations will want to inherit from here.
This class doesn't define how Organims are stored or accessed so inheriting classes
can define that themselves.
- Since:
- 1.5
- Version:
- 1.0
- Author:
- Mark Schreiber
-
Field Summary
Fields inherited from interface org.biojavax.ga.Population
NAME, ORGANISMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddOrganism(Organism org) Adds an Organism to the Populationprotected abstract voidaddOrganismImpl(Organism org) final voidaddOrganisms(Set orgs) Adds several organisms to the populationfinal voidaddOrganisms(Organism[] orgs) Adds several organisms to the populationfinal voidaddOrganisms(Population orgs) Adds the residents of one population to this onegetName()final voidRemoves all theOrganismsin thisPopulationprotected abstract voidfinal voidremoveOrganism(Organism org) Kills off the organismprotected abstract voidfinal voidremoveOrganisms(Set orgs) Removes all theOrganismsinorgsfinal voidremoveOrganisms(Organism[] orgs) Removes all theOrganismsinorgsfinal voidSets the name of the populationMethods inherited from class org.biojava.utils.AbstractChangeable
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.biojava.utils.Changeable
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerMethods inherited from interface org.biojavax.ga.Population
getOrganismByName, getOrganisms, organisms, size
-
Constructor Details
-
AbstractPopulation
public AbstractPopulation() -
AbstractPopulation
-
-
Method Details
-
getName
- Specified by:
getNamein interfacePopulation- Returns:
- the name of the population
-
setName
Description copied from interface:PopulationSets the name of the population- Specified by:
setNamein interfacePopulation- Parameters:
name- set the name to this.- Throws:
ChangeVetoException- if the name may not be changed
-
addOrganism
Description copied from interface:PopulationAdds an Organism to the Population- Specified by:
addOrganismin interfacePopulation- Parameters:
org- the organism- Throws:
ChangeVetoExceptionIllegalOrganismException- if for some reason the organism is invalid
-
addOrganismImpl
- Throws:
IllegalOrganismException
-
addOrganisms
public final void addOrganisms(Organism[] orgs) throws ChangeVetoException, IllegalOrganismException Description copied from interface:PopulationAdds several organisms to the population- Specified by:
addOrganismsin interfacePopulation- Parameters:
orgs- the organisms to add- Throws:
ChangeVetoExceptionIllegalOrganismException- if for some reason the organism is invalid
-
addOrganisms
Description copied from interface:PopulationAdds several organisms to the population- Specified by:
addOrganismsin interfacePopulation- Parameters:
orgs- the organisms to add- Throws:
ChangeVetoExceptionIllegalOrganismException- if for some reason the organism is invalid
-
addOrganisms
public final void addOrganisms(Population orgs) throws ChangeVetoException, IllegalOrganismException Description copied from interface:PopulationAdds the residents of one population to this one- Specified by:
addOrganismsin interfacePopulation- Parameters:
orgs- the population to add- Throws:
ChangeVetoExceptionIllegalOrganismException- if for some reason the organism is invalid
-
removeOrganisms
Description copied from interface:PopulationRemoves all theOrganismsinorgs- Specified by:
removeOrganismsin interfacePopulation- Parameters:
orgs- theOrganismsto remove.- Throws:
ChangeVetoException- if the change is vetoed
-
removeOrganisms
Description copied from interface:PopulationRemoves all theOrganismsinorgs- Specified by:
removeOrganismsin interfacePopulation- Parameters:
orgs- theOrganismsto remove.- Throws:
ChangeVetoException- if the change is vetoed
-
removeAllOrganisms
Description copied from interface:PopulationRemoves all theOrganismsin thisPopulation- Specified by:
removeAllOrganismsin interfacePopulation- Throws:
ChangeVetoException- if the change is vetoed
-
removeOrganism
Description copied from interface:PopulationKills off the organism- Specified by:
removeOrganismin interfacePopulation- Parameters:
org- the organism to kill- Throws:
ChangeVetoException
-
removeOrganismImpl
-
removeAllOrganismsImpl
-