public final class SimplePopulation extends AbstractPopulation
Simple concrete implementation of the Population
interface
Internally the SimplePopulation store Organisms in a HashMap
NAME, ORGANISMS
Constructor and Description |
---|
SimplePopulation() |
SimplePopulation(String name) |
Modifier and Type | Method and Description |
---|---|
protected void |
addOrganismImpl(Organism orgToAdd) |
Organism |
getOrganismByName(String name)
Gets the specified organism
|
Set |
getOrganisms()
Gets the Set of Organisms
|
Iterator |
organisms() |
protected void |
removeAllOrganismsImpl() |
protected void |
removeOrganismImpl(Organism orgToRemove) |
int |
size()
Gets the Size of the population
|
addOrganism, addOrganisms, addOrganisms, addOrganisms, getName, removeAllOrganisms, removeOrganism, removeOrganisms, removeOrganisms, setName
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
public SimplePopulation(String name)
public SimplePopulation()
protected void addOrganismImpl(Organism orgToAdd) throws IllegalOrganismException
addOrganismImpl
in class AbstractPopulation
IllegalOrganismException
protected void removeOrganismImpl(Organism orgToRemove)
removeOrganismImpl
in class AbstractPopulation
protected void removeAllOrganismsImpl()
removeAllOrganismsImpl
in class AbstractPopulation
public Organism getOrganismByName(String name)
Population
name
- the name of the organism to retreivepublic int size()
Population
public Set getOrganisms()
Population
Copyright © 2014 BioJava. All rights reserved.