org.opt4j.core
Interface IndividualFactory

All Known Implementing Classes:
AbstractIndividualFactory, DefaultIndividualFactory

public interface IndividualFactory

The IndividualFactory is a creator for Individuals.


Method Summary
 void addIndividualStateListener(IndividualStateListener listener)
          Adds an IndividualStateListener to each Individual that is created by this class.
 Individual create()
          Creates a new Individual.
 Individual create(Genotype genotype)
          Creates a new Individual with a specified Genotype.
 void removeIndividualStateListener(IndividualStateListener listener)
          Removes an IndividualStateListener that is invoked if the state of any Individual changes.
 

Method Detail

create

Individual create()
Creates a new Individual.

Returns:
the built individual

create

Individual create(Genotype genotype)
Creates a new Individual with a specified Genotype.

Parameters:
genotype - the genotype of the individual
Returns:
the built individual

addIndividualStateListener

void addIndividualStateListener(IndividualStateListener listener)
Adds an IndividualStateListener to each Individual that is created by this class. This listener is invoked if the state of the Individual changes.

Parameters:
listener - the listener that is invoked if the state of any individual changes
See Also:
removeIndividualStateListener(org.opt4j.core.IndividualStateListener)

removeIndividualStateListener

void removeIndividualStateListener(IndividualStateListener listener)
Removes an IndividualStateListener that is invoked if the state of any Individual changes. All Individuals created after this method call by this IndividualFactory do no longer use the listener.

Parameters:
listener - the listener that is invoked if the state of any individual changes
See Also:
addIndividualStateListener(org.opt4j.core.IndividualStateListener)