01: /*
02: * This file is part of JGAP.
03: *
04: * JGAP offers a dual license model containing the LGPL as well as the MPL.
05: *
06: * For licensing information please see the file license.txt included with JGAP
07: * or have a look at the top of class org.jgap.Chromosome which representatively
08: * includes the JGAP license policy applicable for any file delivered with JGAP.
09: */
10: package org.jgap;
11:
12: /**
13: * Interface for checking whether a given allele value is valid to be set for
14: * a given gene instance. The contained validate()-method will be called in
15: * the setAllele(Object) method of Gene implementations.
16: *
17: * @author Klaus Meffert
18: * @since 2.0
19: */
20: public interface IGeneConstraintChecker extends java.io.Serializable {
21: /** String containing the CVS revision. Read out via reflection!*/
22: final static String CVS_REVISION = "$Revision: 1.8 $";
23:
24: /**
25: * Check if a given allele value is valid for the given gene instance.
26: *
27: * @param a_gene the gene the given allele is to be validated for
28: * @param a_alleleValue the allele value to be validated
29: * @param a_chromosome the chromosome the gene is contained (or null, if
30: * unknown)
31: * @param a_geneIndex the index the gene is contained in the chromosome at,
32: * or -1 if unknown
33: * @return true: allele may be set for gene; false: validity check failed
34: *
35: * @author Klaus Meffert
36: * @since 2.0
37: */
38: boolean verify(Gene a_gene, Object a_alleleValue,
39: IChromosome a_chromosome, int a_geneIndex);
40: }
|