|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.Vector
com.rubecula.util.AuditableVector
com.rubecula.darwin.core.Darwinian_Abstract
public abstract class Darwinian_Abstract
Abstract class implementing Darwinian interface.
| Field Summary | |
|---|---|
protected Census |
_CensusTaker
The census taker which imlements the Census in order to make a census of this Darwinian system. |
protected Genome |
_Genome
The Genome of this Darwinian system (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 Darwinian system (fixed). |
protected static org.apache.commons.logging.Log |
log
The logger for this class. |
| Fields inherited from class java.util.Vector |
|---|
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
protected |
Darwinian_Abstract(String identifier,
Genome genome,
Phenome phenome,
Census censusTaker,
Mortality mortality,
MateChoice chooser,
Fecundity fecundity)
Constructor to create a Darwinian system with no populations. |
| Method Summary | |
|---|---|
boolean |
add(Object arg0)
|
boolean |
add(Population arg0)
Mutating method to add a population to the system. |
void |
census(PrintWriter out)
Method to enumerate this population for census purposes. |
Census |
getCensusTaker()
|
MateChoice |
getChooser()
|
Factory |
getFactory()
|
Fecundity |
getFecundity()
|
int |
getGeneration()
|
Genome |
getGenome()
|
Mortality |
getMortality()
|
Phenome |
getPhenome()
Method to get the phenome for this system, i.e. |
Population |
getPopulation(int index)
|
void |
midGenerationProcessing()
A (callback) method which will be invoked at the midpoint of each generation. |
boolean |
nextGeneration()
For each population in this system, call nextGeneration(). |
void |
postGenerationCleanup()
A (callback) method which will be invoked at the termination of each generation. |
void |
preGenerationPreparation()
A (callback) method which will be invoked at the start of each generation. |
void |
seedGeneration(int organisms)
Method to seed the system by seeding a certain number of new organisms in each of the system's populations. |
void |
setChooser(MateChoice chooser)
MUTATING method to explicitly set the implementer of MateChoice. |
void |
setFecundity(Fecundity fecundity)
MUTATING method to explicitly set the implementer of Fecundity. |
void |
setMortality(Mortality mortality)
MUTATING method to explicitly set the implementer of Mortality. |
void |
setupListeners(EnvironmentListener listener)
Set up environment listeners. |
void |
setupListeners(PopulationListener listener)
Mutating method to add, for each of this system's populations, a listener, i.e. |
String |
toString()
|
| Methods inherited from class com.rubecula.util.AuditableVector |
|---|
audit, audit, audit, getIdentifier |
| Methods inherited from class java.util.Vector |
|---|
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
iterator, listIterator, listIterator |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface com.rubecula.darwin.core.Darwinian |
|---|
size |
| Methods inherited from interface com.rubecula.util.Identifiable |
|---|
getIdentifier |
| Methods inherited from interface java.util.List |
|---|
iterator, listIterator, listIterator |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
protected final Census _CensusTaker
protected final Genome _Genome
protected Mortality _Mortality
protected final Phenome _Phenome
| Constructor Detail |
|---|
protected Darwinian_Abstract(String identifier,
Genome genome,
Phenome phenome,
Census censusTaker,
Mortality mortality,
MateChoice chooser,
Fecundity fecundity)
identifier - the identifier for this new system.genome - the genome on which 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 boolean add(Object arg0)
add in interface Collectionadd in interface Listadd in class Vectorpublic boolean add(Population arg0)
Darwinian
add in interface Darwinianarg0 - an implementer of Population.
public void census(PrintWriter out)
Darwinian
census in interface Darwinianout - the print writer to which census results will be sent.CensusUtils.DefaultEnumeration(java.util.Iterator, com.rubecula.darwin.core.Census, java.io.PrintWriter)public Census getCensusTaker()
getCensusTaker in interface DarwinianCensus.public MateChoice getChooser()
getChooser in interface DarwinianMateChoice.public Factory getFactory()
getFactory in interface Darwinianpublic Fecundity getFecundity()
getFecundity in interface DarwinianFecundity.public int getGeneration()
getGeneration in interface Generatablepublic Genome getGenome()
getGenome in interface DarwinianDarwinian System.public Mortality getMortality()
getMortality in interface DarwinianMortality.public Phenome getPhenome()
DarwinianPhenome.
getPhenome in interface Darwinianpublic Population getPopulation(int index)
getPopulation in interface Darwinianpublic boolean nextGeneration()
nextGeneration in interface GeneratableGeneratable.nextGeneration()public void seedGeneration(int organisms)
Darwinian
seedGeneration in interface Darwinianorganisms - the number of new organisms to create in each population.public void setChooser(MateChoice chooser)
Darwinian
setChooser in interface Darwinianchooser - an application-specific implementation of MateChoice.public void setFecundity(Fecundity fecundity)
Darwinian
setFecundity in interface Darwinianfecundity - an application-specific implementation of Fecundity.public void setMortality(Mortality mortality)
Darwinian
setMortality in interface Darwinianmortality - an application-specific implementation of Mortality.public void setupListeners(EnvironmentListener listener)
Darwinian
setupListeners in interface Darwinianpublic void setupListeners(PopulationListener listener)
DarwinianPopulationListener.
setupListeners in interface Darwinianlistener - the listener of population change events.public void midGenerationProcessing()
Generatable
midGenerationProcessing in interface Generatablepublic void postGenerationCleanup()
Generatable
postGenerationCleanup in interface Generatablepublic void preGenerationPreparation()
Generatable
preGenerationPreparation in interface Generatablepublic String toString()
toString in class Vector
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||