|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.tostring0.AToString
com.rubecula.darwin.evolution.Evolver_
public abstract class Evolver_
This is the base abstract class for the Evolver interface.
| Field Summary | |
|---|---|
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 |
Evolver_()
|
| Method Summary | |
|---|---|
void |
addEvolvable(Evolvable listener)
TEST |
void |
addEvolvable(Evolvable evolvable,
int ticks)
Add an evolvable object which undergoes a new generation once every ticks ticks of the clock. |
boolean |
addListener(GenerationListener listener)
Add a listener to the evolution process. |
boolean |
addVisualizableListener(VisualizableListener listener)
This is invoked by reflection during configuration. |
void |
cleanup()
TEST |
long |
getClock()
|
ClockWatcher |
getClockWatcher()
|
java.util.Set<Evolvable> |
getEvolvableKeys()
|
protected java.util.Map<Evolvable,java.lang.Integer> |
getEvolvables()
|
protected java.util.Collection<GenerationListener> |
getListeners()
|
protected java.util.Collection<VisualizableListener> |
getVisualizableListeners()
|
void |
init()
This method initializes the Evolution so that it is ready to start the first generation. |
boolean |
next()
Create a new EvolutionTask and run it. |
void |
postConfigure(java.lang.Object data)
Do nothing - override if you need something doing |
void |
preConfigure(java.lang.Object data)
Do nothing - override if you need something doing |
java.lang.Integer |
putEvolvable(Evolvable evolvable,
java.lang.Integer ticks)
This is invoked by reflection during configuration. |
void |
removeEvolvable(Evolvable evolvable)
|
void |
seedEvolvables()
Seed the currently registered evolvables by calling Theological.seedMembers() on each one. |
void |
setClockWatcher(ClockWatcher clockWatcher)
|
void |
setEvolvables(java.util.Map<? extends Evolvable,? extends java.lang.Integer> map)
Bean-type method to define the evolvables. |
void |
setListeners(java.util.Collection<? extends GenerationListener> listeners)
This is invoked by reflection during configuration. |
void |
setVisualizableListeners(java.util.Collection<VisualizableListener> visualizableListeners)
Method to clear and reset the visualizable listeners. |
static java.lang.String |
showTime(java.util.Calendar time)
|
static void |
showTime(java.util.Calendar time,
java.io.PrintWriter writer)
|
| Methods inherited from class net.sf.tostring0.AToString |
|---|
toString, toString, toStringBrief, toStringId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log LOG
| Constructor Detail |
|---|
protected Evolver_()
| Method Detail |
|---|
public static java.lang.String showTime(java.util.Calendar time)
time -
public static void showTime(java.util.Calendar time,
java.io.PrintWriter writer)
time - writer - the writer to show the time onpublic void addEvolvable(Evolvable listener)
addEvolvable in interface Evolverlistener - Evolver.addEvolvable(com.rubecula.darwin.foundation.Evolvable,
int)
public void addEvolvable(Evolvable evolvable,
int ticks)
Evolverticks ticks of the clock.
addEvolvable in interface Evolverevolvable - an Evolvable object, typically a Taxon.ticks - the number of ticks of the clock per generation.Evolver.addEvolvable(com.rubecula.darwin.foundation.Evolvable,
int)public boolean addListener(GenerationListener listener)
Evolver
addListener in interface EvolverEvolver.addListener(com.rubecula.darwin.domain.helper.GenerationListener)public boolean addVisualizableListener(VisualizableListener listener)
listener -
Collection.add(java.lang.Object)public void cleanup()
cleanup in interface EvolverEvolver.cleanup()public long getClock()
getClock in interface Clockedpublic ClockWatcher getClockWatcher()
getClockWatcher in interface Evolverpublic java.util.Set<Evolvable> getEvolvableKeys()
getEvolvableKeys in interface EvolverEvolvable objects.Evolver.getEvolvableKeys()public void init()
Applet.start().
The complementary method is #cleanup().
init in interface EvolverEvolver.init()
public boolean next()
throws EvolutionException
EvolutionTask and run it. This method has works
quite differently in the two different modes (manual versus auto). When
this Evolution is in auto mode, we is intended for manual
stepping of the evolutionary process.
next in interface EvolverEvolutionExceptionEvolver.next()public void postConfigure(java.lang.Object data)
postConfigure in interface com.rubecula.beanpot.ConfigurableConfigurable.postConfigure(java.lang.Object)public void preConfigure(java.lang.Object data)
preConfigure in interface com.rubecula.beanpot.ConfigurableConfigurable.preConfigure(java.lang.Object)
public java.lang.Integer putEvolvable(Evolvable evolvable,
java.lang.Integer ticks)
evolvable - ticks -
public void removeEvolvable(Evolvable evolvable)
removeEvolvable in interface EvolverEvolver.removeEvolvable(com.rubecula.darwin.foundation.Evolvable)public void seedEvolvables()
EvolverTheological.seedMembers() on each one.
seedEvolvables in interface Evolverpublic void setClockWatcher(ClockWatcher clockWatcher)
setClockWatcher in interface EvolverclockWatcher - the clockWatcher to setpublic void setEvolvables(java.util.Map<? extends Evolvable,? extends java.lang.Integer> map)
map - A map of Evolvable objects, each with the number of ticks
between generations. The evolutionary process proceeds one
tick at a time, but not every evolvable will undergo a new
generation for every tick. For instance, the 13-year and
17-year cicadas would have tick values of 13 and 17 assuming
that the Evolution proceeded one tick per year.public void setListeners(java.util.Collection<? extends GenerationListener> listeners)
listeners - public void setVisualizableListeners(java.util.Collection<VisualizableListener> visualizableListeners)
visualizableListeners - protected java.util.Map<Evolvable,java.lang.Integer> getEvolvables()
protected java.util.Collection<GenerationListener> getListeners()
protected java.util.Collection<VisualizableListener> getVisualizableListeners()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||