JGAP

org.jgap
Interface IGeneConstraintChecker

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
CoinsEnergy.EnergyGeneConstraintChecker

public interface IGeneConstraintChecker
extends java.io.Serializable

Interface for checking whether a given allele value is valid to be set for a given gene instance. The contained validate()-method will be called in the setAllele(Object) method of Gene implementations.

Since:
2.0

Field Summary
static java.lang.String CVS_REVISION
          String containing the CVS revision.
 
Method Summary
 boolean verify(Gene a_gene, java.lang.Object a_alleleValue, IChromosome a_chromosome, int a_geneIndex)
          Check if a given allele value is valid for the given gene instance.
 

Field Detail

CVS_REVISION

static final java.lang.String CVS_REVISION
String containing the CVS revision. Read out via reflection!

See Also:
Constant Field Values
Method Detail

verify

boolean verify(Gene a_gene,
               java.lang.Object a_alleleValue,
               IChromosome a_chromosome,
               int a_geneIndex)
Check if a given allele value is valid for the given gene instance.

Parameters:
a_gene - the gene the given allele is to be validated for
a_alleleValue - the allele value to be validated
a_chromosome - the chromosome the gene is contained (or null, if unknown)
a_geneIndex - the index the gene is contained in the chromosome at, or -1 if unknown
Returns:
true: allele may be set for gene; false: validity check failed
Since:
2.0

JGAP