public abstract class AbstractPopulation extends AbstractChangeable implements Population
NAME, ORGANISMS
Constructor and Description |
---|
AbstractPopulation() |
AbstractPopulation(String name) |
Modifier and Type | Method and Description |
---|---|
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
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getOrganismByName, getOrganisms, organisms, size
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public AbstractPopulation()
public AbstractPopulation(String name)
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 organismChangeVetoException
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 addChangeVetoException
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 addChangeVetoException
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 addChangeVetoException
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 killChangeVetoException
protected abstract void removeOrganismImpl(Organism org)
protected abstract void removeAllOrganismsImpl()
Copyright © 2014 BioJava. All rights reserved.