|
||||||||||
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 Population
name
- set the name to this.
ChangeVetoException
- if the name may not be changedpublic final void addOrganism(Organism org) throws ChangeVetoException, IllegalOrganismException
Population
addOrganism
in interface Population
org
- the organism
ChangeVetoException
IllegalOrganismException
- if for some reason the organism is invalidprotected abstract void addOrganismImpl(Organism org) throws IllegalOrganismException
IllegalOrganismException
public final void addOrganisms(Organism[] orgs) throws ChangeVetoException, IllegalOrganismException
Population
addOrganisms
in interface Population
orgs
- the organisms to add
ChangeVetoException
IllegalOrganismException
- if for some reason the organism is invalidpublic final void addOrganisms(Set orgs) throws ChangeVetoException, IllegalOrganismException
Population
addOrganisms
in interface Population
orgs
- the organisms to add
ChangeVetoException
IllegalOrganismException
- if for some reason the organism is invalidpublic final void addOrganisms(Population orgs) throws ChangeVetoException, IllegalOrganismException
Population
addOrganisms
in interface Population
orgs
- the population to add
ChangeVetoException
IllegalOrganismException
- if for some reason the organism is invalidpublic final void removeOrganisms(Organism[] orgs) throws ChangeVetoException
Population
Organisms
in orgs
removeOrganisms
in interface Population
orgs
- the Organisms
to remove.
ChangeVetoException
- if the change is vetoedpublic final void removeOrganisms(Set orgs) throws ChangeVetoException
Population
Organisms
in orgs
removeOrganisms
in interface Population
orgs
- the Organisms
to remove.
ChangeVetoException
- if the change is vetoedpublic final void removeAllOrganisms() throws ChangeVetoException
Population
Organisms
in this Population
removeAllOrganisms
in interface Population
ChangeVetoException
- if the change is vetoedpublic final void removeOrganism(Organism org) throws ChangeVetoException
Population
removeOrganism
in interface Population
org
- the organism to kill
ChangeVetoException
protected 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 |