|
||||||||||
| 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.AbstractOrganism
public abstract class AbstractOrganism
Abstract implementation of Organism. Most implementations would want to inherit from here.
| Field Summary | |
|---|---|
protected SymbolList[] |
chromosomes
|
| Fields inherited from interface org.biojavax.ga.Organism |
|---|
CHROMOSOMES, NAME |
| Constructor Summary | |
|---|---|
protected |
AbstractOrganism()
|
protected |
AbstractOrganism(Organism org,
String name)
|
| Method Summary | |
|---|---|
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 |
| 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.Organism |
|---|
replicate |
| Methods inherited from interface org.biojava.utils.Changeable |
|---|
addChangeListener, addChangeListener, isUnchanging, removeChangeListener, removeChangeListener |
| Field Detail |
|---|
protected SymbolList[] chromosomes
| Constructor Detail |
|---|
protected AbstractOrganism()
protected AbstractOrganism(Organism org,
String name)
| Method Detail |
|---|
public final SymbolList[] getChromosomes()
Organism
getChromosomes in interface OrganismSymbolList[]public final double[] getFitness()
Organism
getFitness in interface Organismpublic String getName()
Organism
getName in interface Organismpublic abstract boolean isHaploid()
Organism
isHaploid in interface Organismprotected abstract void setChromImpl(SymbolList[] chromosomes)
public final void setChromosomes(SymbolList[] chromosomes)
throws ChangeVetoException
Organism
setChromosomes in interface Organismchromosomes - 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 Organismname - the name of the organism.
ChangeVetoException - if the name may not be changed.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||