public abstract class AbstractOrganism extends AbstractChangeable implements Organism
| Modifier and Type | Field and Description |
|---|---|
protected SymbolList[] |
chromosomes |
CHROMOSOMES, NAME| Modifier | Constructor and Description |
|---|---|
protected |
AbstractOrganism() |
protected |
AbstractOrganism(Organism org,
String name) |
| Modifier and Type | Method and Description |
|---|---|
SymbolList[] |
getChromosomes()
Gets the organisms 'chromosome' sequences
|
double[] |
getFitness()
Returns the current fitness of this organism.
|
String |
getName()
Gets the organisms name
|
abstract boolean |
isHaploid()
Is the organism Haploid?
|
protected abstract void |
setChromImpl(SymbolList[] chromosomes) |
void |
setChromosomes(SymbolList[] chromosomes)
Sets the organisms 'chromosome' sequences.
|
void |
setFitness(double[] fitness)
This method allows to set the fitness of this organism to the specified
value.
|
void |
setName(String name)
Sets the organisms name
|
addChangeListener, addChangeListener, generateChangeSupport, getChangeSupport, hasListeners, hasListeners, isUnchanging, removeChangeListener, removeChangeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListenerprotected SymbolList[] chromosomes
protected AbstractOrganism()
protected AbstractOrganism(Organism org, String name)
public final SymbolList[] getChromosomes()
OrganismgetChromosomes in interface OrganismSymbolList[]public final double[] getFitness()
OrganismgetFitness in interface Organismpublic abstract boolean isHaploid()
Organismprotected abstract void setChromImpl(SymbolList[] chromosomes)
public final void setChromosomes(SymbolList[] chromosomes) throws ChangeVetoException
OrganismsetChromosomes in interface Organismchromosomes - a SymbolList[]ChangeVetoException - if the Chromosome collection of the Organism is unchangablepublic final void setFitness(double[] fitness)
OrganismsetFitness in interface Organismpublic final void setName(String name) throws ChangeVetoException
OrganismsetName in interface Organismname - the name of the organism.ChangeVetoException - if the name may not be changed.Copyright © 2020 BioJava. All rights reserved.