Package org.biojavax.ga.impl
Class SimplePopulation
java.lang.Object
org.biojava.utils.AbstractChangeable
org.biojavax.ga.impl.AbstractPopulation
org.biojavax.ga.impl.SimplePopulation
- All Implemented Interfaces:
Changeable,Population
Simple concrete implementation of the Population interface
Internally the SimplePopulation store Organisms in a HashMap
- 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 TypeMethodDescriptionprotected voidaddOrganismImpl(Organism orgToAdd) getOrganismByName(String name) Gets the specified organismGets the Set of Organismsprotected voidprotected voidremoveOrganismImpl(Organism orgToRemove) intsize()Gets the Size of the populationMethods inherited from class org.biojavax.ga.impl.AbstractPopulation
addOrganism, addOrganisms, addOrganisms, addOrganisms, getName, removeAllOrganisms, removeOrganism, removeOrganisms, removeOrganisms, setNameMethods 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, removeChangeListener
-
Constructor Details
-
SimplePopulation
-
SimplePopulation
public SimplePopulation()
-
-
Method Details
-
addOrganismImpl
- Specified by:
addOrganismImplin classAbstractPopulation- Throws:
IllegalOrganismException
-
removeOrganismImpl
- Specified by:
removeOrganismImplin classAbstractPopulation
-
removeAllOrganismsImpl
- Specified by:
removeAllOrganismsImplin classAbstractPopulation
-
getOrganismByName
Description copied from interface:PopulationGets the specified organism- Parameters:
name- the name of the organism to retreive- Returns:
- the organism named or null if that organism doesn't exist.
-
size
Description copied from interface:PopulationGets the Size of the population- Returns:
- the size
-
organisms
- Returns:
- an iterator over the set of Organisms.
-
getOrganisms
Description copied from interface:PopulationGets the Set of Organisms- Returns:
- a Set
-