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, removeChangeListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener
protected SymbolList[] chromosomes
protected AbstractOrganism()
protected AbstractOrganism(Organism org, String name)
public final SymbolList[] getChromosomes()
Organism
getChromosomes
in interface Organism
SymbolList[]
public final double[] getFitness()
Organism
getFitness
in interface Organism
public abstract boolean isHaploid()
Organism
protected abstract void setChromImpl(SymbolList[] chromosomes)
public final void setChromosomes(SymbolList[] chromosomes) throws ChangeVetoException
Organism
setChromosomes
in interface Organism
chromosomes
- a SymbolList[]
ChangeVetoException
- if the Chromosome collection of the Organism is unchangablepublic final void setFitness(double[] fitness)
Organism
setFitness
in interface Organism
public final void setName(String name) throws ChangeVetoException
Organism
setName
in interface Organism
name
- the name of the organism.ChangeVetoException
- if the name may not be changed.Copyright © 2014 BioJava. All rights reserved.