|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.biojava.utils.AbstractChangeable
org.biojavax.ga.impl.AbstractPopulation
public abstract class AbstractPopulation
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.
| Field Summary |
|---|
| Fields inherited from interface org.biojavax.ga.Population |
|---|
NAME, ORGANISMS |
| Constructor Summary | |
|---|---|
AbstractPopulation()
|
|
AbstractPopulation(String name)
|
|
| Method Summary | |
|---|---|
void |
addOrganism(Organism org)
Adds an Organism to the Population |
protected abstract void |
addOrganismImpl(Organism org)
|
void |
addOrganisms(Organism[] orgs)
Adds several organisms to the population |
void |
addOrganisms(Population orgs)
Adds the residents of one population to this one |
void |
addOrganisms(Set orgs)
Adds several organisms to the population |
String |
getName()
|
void |
removeAllOrganisms()
Removes all the Organisms in this Population |
protected abstract void |
removeAllOrganismsImpl()
|
void |
removeOrganism(Organism org)
Kills off the organism |
protected abstract void |
removeOrganismImpl(Organism org)
|
void |
removeOrganisms(Organism[] orgs)
Removes all the Organisms in orgs |
void |
removeOrganisms(Set orgs)
Removes all the Organisms in orgs |
void |
setName(String name)
Sets the name of the population |
| Methods inherited from class org.biojava.utils.AbstractChangeable |
|---|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.biojavax.ga.Population |
|---|
getOrganismByName, getOrganisms, organisms, size |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Constructor Detail |
|---|
public AbstractPopulation()
public AbstractPopulation(String name)
| Method Detail |
|---|
public String getName()
getName in interface Population
public final void setName(String name)
throws ChangeVetoException
Population
setName in interface Populationname - set the name to this.
ChangeVetoException - if the name may not be changed
public final void addOrganism(Organism org)
throws ChangeVetoException,
IllegalOrganismException
Population
addOrganism in interface Populationorg - the organism
ChangeVetoException
IllegalOrganismException - if for some reason the organism is invalid
protected abstract void addOrganismImpl(Organism org)
throws IllegalOrganismException
IllegalOrganismException
public final void addOrganisms(Organism[] orgs)
throws ChangeVetoException,
IllegalOrganismException
Population
addOrganisms in interface Populationorgs - the organisms to add
ChangeVetoException
IllegalOrganismException - if for some reason the organism is invalid
public final void addOrganisms(Set orgs)
throws ChangeVetoException,
IllegalOrganismException
Population
addOrganisms in interface Populationorgs - the organisms to add
ChangeVetoException
IllegalOrganismException - if for some reason the organism is invalid
public final void addOrganisms(Population orgs)
throws ChangeVetoException,
IllegalOrganismException
Population
addOrganisms in interface Populationorgs - the population to add
ChangeVetoException
IllegalOrganismException - if for some reason the organism is invalid
public final void removeOrganisms(Organism[] orgs)
throws ChangeVetoException
PopulationOrganisms in orgs
removeOrganisms in interface Populationorgs - the Organisms to remove.
ChangeVetoException - if the change is vetoed
public final void removeOrganisms(Set orgs)
throws ChangeVetoException
PopulationOrganisms in orgs
removeOrganisms in interface Populationorgs - the Organisms to remove.
ChangeVetoException - if the change is vetoed
public final void removeAllOrganisms()
throws ChangeVetoException
PopulationOrganisms in this Population
removeAllOrganisms in interface PopulationChangeVetoException - if the change is vetoed
public final void removeOrganism(Organism org)
throws ChangeVetoException
Population
removeOrganism in interface Populationorg - the organism to kill
ChangeVetoExceptionprotected abstract void removeOrganismImpl(Organism org)
protected abstract void removeAllOrganismsImpl()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||