org.jgap
Interface IGeneConstraintChecker


public interface IGeneConstraintChecker

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
Author:
Klaus Meffert

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)
          Check if a given allele value is valid for the given gene instance.
 

Field Detail

CVS_REVISION

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

See Also:
Constant Field Values
Method Detail

verify

public boolean verify(Gene a_gene,
                      java.lang.Object a_alleleValue)
               throws java.lang.RuntimeException
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
Returns:
true: allele may be set for gene; false: validity check failed
Throws:
java.lang.RuntimeException - if the checker cannot decide whether the given allele is valid or not
Since:
2.0