com.anji.run
Class Run

java.lang.Object
  extended bycom.anji.run.Run
All Implemented Interfaces:
Configurable, GeneticEventListener

public class Run
extends java.lang.Object
implements GeneticEventListener, Configurable

Hibernate-able run object.

Author:
Philip Tucker

Constructor Summary
Run()
          should call init() after this ctor, unless it's called from hibernate
Run(java.lang.String aName)
           
 
Method Summary
 void addGeneration(Genotype genotype)
          Add new generation to run.
 boolean equals(java.lang.Object o)
           
 void geneticEventFired(GeneticEvent event)
          Notify this GeneticEventListener that an event has been fired of a type to which this listener is subscribed.
 java.util.List getGenerations()
           
 java.lang.String getName()
           
 Properties getProps()
           
 java.util.Calendar getStartTime()
           
 int hashCode()
           
 void init(Properties aProps)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Run

public Run()
should call init() after this ctor, unless it's called from hibernate


Run

public Run(java.lang.String aName)
Parameters:
aName -
Method Detail

hashCode

public int hashCode()
See Also:
Object.hashCode()

equals

public boolean equals(java.lang.Object o)
See Also:
Object.equals(java.lang.Object)

addGeneration

public void addGeneration(Genotype genotype)
Add new generation to run.

Parameters:
genotype -

toString

public java.lang.String toString()
See Also:
Object.toString()

geneticEventFired

public void geneticEventFired(GeneticEvent event)
Description copied from interface: GeneticEventListener
Notify this GeneticEventListener that an event has been fired of a type to which this listener is subscribed.

Specified by:
geneticEventFired in interface GeneticEventListener
Parameters:
event - The event object that was fired. The type of event can be determined by the GeneticEvent's name.
See Also:
GeneticEventListener.geneticEventFired(org.jgap.event.GeneticEvent)

getName

public java.lang.String getName()
Returns:
unique run ID

getGenerations

public java.util.List getGenerations()
Returns:
generations orderd by generation number

init

public void init(Properties aProps)
          throws java.lang.Exception
Specified by:
init in interface Configurable
Parameters:
aProps - configuration parameters
Throws:
java.lang.Exception
See Also:
Configurable.init(com.anji.util.Properties)

getProps

public Properties getProps()
Returns:
properties

getStartTime

public java.util.Calendar getStartTime()
Returns:
time when this object was created