org.jgap.event
Class GeneticEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byorg.jgap.event.GeneticEvent
All Implemented Interfaces:
java.io.Serializable

public class GeneticEvent
extends java.util.EventObject

Represents events that are fired via the EventManager when various genetic events occur. The specific kind of event is conveyed through the event name. Standard event names are provided as constants in this class.

See Also:
Serialized Form

Field Summary
static java.lang.String GENOTYPE_EVALUATED_EVENT
          Public constant representing the name of the event that is fired each time a Genotype is finished evaluating population fitness.
static java.lang.String GENOTYPE_EVOLVED_EVENT
          Public constant representing the name of the event that is fired each time a Genotype is finished with a single evolution cycle.
static java.lang.String GENOTYPE_FINISH_GENETIC_OPERATORS_EVENT
          Public constant representing the name of the event that is fired each time a Genotype begins genetic operators.
static java.lang.String GENOTYPE_START_GENETIC_OPERATORS_EVENT
          Public constant representing the name of the event that is fired each time a Genotype begins genetic operators.
static java.lang.String RUN_COMPLETED_EVENT
          Public constant representing the name of the event that is fired each time a run is completed.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
GeneticEvent(java.lang.String a_eventName, java.lang.Object a_source)
          Constructs a new GeneticEvent of the given name.
 
Method Summary
 java.lang.String getEventName()
          Retrieves the name of this event, which can be used to identify the type of event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GENOTYPE_EVOLVED_EVENT

public static final java.lang.String GENOTYPE_EVOLVED_EVENT
Public constant representing the name of the event that is fired each time a Genotype is finished with a single evolution cycle.

See Also:
Constant Field Values

GENOTYPE_EVALUATED_EVENT

public static final java.lang.String GENOTYPE_EVALUATED_EVENT
Public constant representing the name of the event that is fired each time a Genotype is finished evaluating population fitness.

See Also:
Constant Field Values

GENOTYPE_START_GENETIC_OPERATORS_EVENT

public static final java.lang.String GENOTYPE_START_GENETIC_OPERATORS_EVENT
Public constant representing the name of the event that is fired each time a Genotype begins genetic operators.

See Also:
Constant Field Values

GENOTYPE_FINISH_GENETIC_OPERATORS_EVENT

public static final java.lang.String GENOTYPE_FINISH_GENETIC_OPERATORS_EVENT
Public constant representing the name of the event that is fired each time a Genotype begins genetic operators.

See Also:
Constant Field Values

RUN_COMPLETED_EVENT

public static final java.lang.String RUN_COMPLETED_EVENT
Public constant representing the name of the event that is fired each time a run is completed.

See Also:
Constant Field Values
Constructor Detail

GeneticEvent

public GeneticEvent(java.lang.String a_eventName,
                    java.lang.Object a_source)
Constructs a new GeneticEvent of the given name.

Parameters:
a_eventName - The name of the event.
a_source - The genetic object that acted as the source of the event. The type of this object will be dependent on the kind of event (which can be identified by the event name). It may not be null.
Throws:
java.lang.IllegalArgumentException - if the given source object is null.
Method Detail

getEventName

public java.lang.String getEventName()
Retrieves the name of this event, which can be used to identify the type of event.

Returns:
the name of this GeneticEvent instance.