|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.tostring0.AToString com.rubecula.darwin.foundation.Evolvable_ com.rubecula.darwin.domain.world.Taxon_
public abstract class Taxon_
Abstract class implementing Taxon interface.
Field Summary | |
---|---|
protected Census |
_censusTaker
The census taker which implements the Census in order to make a census of this Taxon. |
protected Genomic |
_genomic
The Genomic of this Taxon (fixed). |
protected Mortality |
_mortality
The "Grim Reaper" which implements the Mortality to determine when organisms in this system will die. |
protected Phenome |
_phenome
The Phenome of this Taxon (fixed). |
protected static org.apache.commons.logging.Log |
LOG
The logger for this class. |
Fields inherited from interface net.sf.tostring0.IToString |
---|
ANGBR_OPEN, ANGBRA_CLSE, BRA_CLSE, BRA_OPEN, BRCE_OPEN, BRCS_CLSE, COLON, LIST_SEPARATOR, MAX_ELEMENTS_DEFAULT, S_MT, S_PERCENT, SEPARATOR, SPACE |
Constructor Summary | |
---|---|
protected |
Taxon_(java.lang.String identifier,
Realm realm,
Genomic genomic,
Phenome phenome,
Census censusTaker,
Mortality mortality,
MateChoice chooser,
Fecundity fecundity)
Constructor to create a Taxon with no populations. |
Method Summary | |
---|---|
int |
addPopulation(Population population)
Add the given population to this Taxon. |
void |
addVisualizableListener(VisualizableListener listener)
XXX |
boolean |
censusMe(Census census,
java.lang.Object prefix)
Method to census this object. |
void |
cullMembers()
For each population, call Theological.cullMembers() , passing value
of organisms. |
void |
doCensus()
XXX this is currently only ever used by tests. |
boolean |
equals(java.lang.Object obj)
|
java.util.Collection<? extends Censusible> |
getCensusibleChildren()
Method to return a list of censusible children of this object. |
Census |
getCensusTaker()
XXX |
MateChoice |
getChooser()
XXX |
Fecundity |
getFecundity()
XXX |
Genomic |
getGenomic()
XXX |
java.lang.String |
getIdentifier()
|
Mortality |
getMortality()
|
Phenome |
getPhenome()
XXX |
PhenotypeCache |
getPhenotypeCache()
|
Population |
getPopulation(int index)
TODO this method should be eliminated. |
java.util.Collection<Population> |
getPopulations()
TODO this method should get the apporpriate populations from this taxon's Realm. |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties()
Bean method. |
java.lang.Object |
getProperty(java.lang.Object key)
Method to get one of the arbitrary application-specific properties of this system. |
Realm |
getRealm()
|
int |
getSeedPopulation()
|
java.util.Collection<VisualizableListener> |
getVisualizableListeners()
Getter/setter typically called by reflection. |
int |
hashCode()
|
boolean |
isFinished()
First we check the super-method. |
boolean |
isLastGeneration()
TODO consider combining this with isFinished() . |
boolean |
nextGeneration()
For each population in this system, call nextGeneration(). |
void |
registerBirths(Colony colony,
java.util.Collection<Organism> neonates)
TODO consider changing parameter to Colony |
void |
registerDeaths(Colony colony,
java.util.Collection<Organism> deaths)
TEST |
void |
registerMarriages(Colony colony,
java.util.Collection<Mating> marriages)
|
void |
seedMembers()
For each population, call Theological.seedMembers() , passing value
of organisms. |
void |
setPopulations(java.util.Collection<Population> populations)
This is the preferred way to set populations, rather than using the addPopulation(Population) method. |
void |
setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
Bean method. |
java.lang.Object |
setProperty(java.lang.String key,
java.lang.Object value)
method to set one of the arbitrary application-specific properties of this system. |
void |
setRegistry(Registry registry)
Invoked via bean operations (e.g dependency injection) |
void |
setSeedPopulation(int seedPopulation)
|
void |
setVisualizableListeners(java.util.Collection<VisualizableListener> visualizableListeners)
This is called, but not addListener() |
Methods inherited from class com.rubecula.darwin.foundation.Evolvable_ |
---|
getGeneration, getMaxGenerations, getResult, setMaxGenerations, setResult |
Methods inherited from class net.sf.tostring0.AToString |
---|
toString, toString, toStringBrief, toStringId |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.rubecula.darwin.foundation.Evolvable |
---|
getGeneration, getResult |
Field Detail |
---|
protected static final org.apache.commons.logging.Log LOG
protected final Census _censusTaker
protected final Genomic _genomic
protected final Mortality _mortality
protected final Phenome _phenome
Constructor Detail |
---|
protected Taxon_(java.lang.String identifier, Realm realm, Genomic genomic, Phenome phenome, Census censusTaker, Mortality mortality, MateChoice chooser, Fecundity fecundity)
identifier
- the identifier for this new system.realm
- the realm in which this system can be found.genomic
- the genomic object on which the genomes of all organisms in
all populations of this new system will be based.phenome
- the phenome which all organisms of all populations of this new
system will exhibit.censusTaker
- an implementer of Census
for the purpose of censusing
populations of the new system.mortality
- an implementer of Mortality
for the purpose of
calculating mortalities of organims in populations of this new
system.chooser
- the mate chooser.fecundity
- the fecundity determiner.Method Detail |
---|
public int addPopulation(Population population)
addPopulation
in interface Taxon
population
- an implementer of Population
.
Taxon.addPopulation(com.rubecula.darwin.domain.helper.Population)
public void addVisualizableListener(VisualizableListener listener)
addVisualizableListener
in interface Taxon
listener
- the listener of population change events.Taxon.addVisualizableListener(com.rubecula.darwin.foundation.VisualizableListener)
public boolean censusMe(Census census, java.lang.Object prefix)
Censusible
censusMe
in interface Censusible
census
- prefix
- for error message only
Censusible.getCensusibleChildren()
.Censusible.censusMe(Census,
java.lang.Object)
public void cullMembers()
Theological.cullMembers()
, passing value
of organisms.
cullMembers
in interface Theological
Theological.seedMembers()
public void doCensus() throws java.io.IOException
doCensus
in interface Taxon
java.io.IOException
Taxon.doCensus()
public boolean equals(java.lang.Object obj)
equals
in class Evolvable_
Evolvable_.equals(java.lang.Object)
public java.util.Collection<? extends Censusible> getCensusibleChildren()
Censusible
getCensusibleChildren
in interface Censusible
ArrayList
of censusible objects.Censusible.getCensusibleChildren()
public Census getCensusTaker()
getCensusTaker
in interface Taxon
Census
.Taxon.getCensusTaker()
public MateChoice getChooser()
getChooser
in interface Taxon
MateChoice
.Taxon.getChooser()
public Fecundity getFecundity()
getFecundity
in interface Taxon
Fecundity
.Taxon.getFecundity()
public Genomic getGenomic()
getGenomic
in interface Taxon
Taxon
System.Taxon.getGenomic()
public java.lang.String getIdentifier()
getIdentifier
in interface net.sf.tostring0.Identifiable
getIdentifier
in class Evolvable_
Evolvable_._identifier
Evolvable_.getIdentifier()
public Mortality getMortality()
getMortality
in interface Taxon
Mortality
.Taxon.getMortality()
public Phenome getPhenome()
getPhenome
in interface Taxon
Taxon.getPhenome()
public PhenotypeCache getPhenotypeCache()
getPhenotypeCache
in interface HasPhenotypeCache
HasPhenotypeCache.getPhenotypeCache()
public Population getPopulation(int index)
index
-
public java.util.Collection<Population> getPopulations()
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.Object key)
getProperty
in interface Taxon
key
- the key to the property.
Taxon.getProperty(java.lang.Object)
public Realm getRealm()
getRealm
in interface Taxon
Taxon.getRealm()
public int getSeedPopulation()
getSeedPopulation
in interface Taxon
public java.util.Collection<VisualizableListener> getVisualizableListeners()
Taxon
getVisualizableListeners
in interface Taxon
Taxon.getVisualizableListeners()
public int hashCode()
hashCode
in class Evolvable_
Evolvable_.hashCode()
public boolean isFinished()
isFinished
in interface Terminal
isFinished
in class Evolvable_
Evolvable_.maxGenerations
.
For a more complex condition, an evolvable could override this
definition.Evolvable_.isFinished()
public boolean isLastGeneration()
isFinished()
.
isLastGeneration
in interface Taxon
Taxon.isLastGeneration()
public boolean nextGeneration()
nextGeneration
in interface Generational
nextGeneration
in class Evolvable_
Generational.nextGeneration()
public void registerBirths(Colony colony, java.util.Collection<Organism> neonates)
Registry
registerBirths
in interface Registry
Registry.registerBirths(Colony,
java.util.Collection)
public void registerDeaths(Colony colony, java.util.Collection<Organism> deaths)
registerDeaths
in interface Registry
Registry.registerDeaths(Colony,
java.util.Collection)
public void registerMarriages(Colony colony, java.util.Collection<Mating> marriages)
registerMarriages
in interface Registry
Registry.registerMarriages(Colony,
java.util.Collection)
public void seedMembers()
Theological.seedMembers()
, passing value
of organisms.
seedMembers
in interface Theological
Theological.seedMembers()
public void setPopulations(java.util.Collection<Population> populations)
addPopulation(Population)
method. Any previous populations are
lost after invoking this method.
setPopulations
in interface Taxon
populations
- a Collection of Population objects.public void setProperties(java.util.Map<java.lang.String,java.lang.Object> properties)
properties
- the map of the arbitrary application-specific properties of
this system.public java.lang.Object setProperty(java.lang.String key, java.lang.Object value)
setProperty
in interface Taxon
key
- value
-
Map.put(Object, Object)
.Taxon.setProperty(java.lang.String,
java.lang.Object)
public void setRegistry(Registry registry)
registry
- public void setSeedPopulation(int seedPopulation)
seedPopulation
- public void setVisualizableListeners(java.util.Collection<VisualizableListener> visualizableListeners)
setVisualizableListeners
in interface Taxon
Taxon.setVisualizableListeners(java.util.Collection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |