1 /* 2 * This file is part of JGAP. 3 * 4 * JGAP offers a dual license model containing the LGPL as well as the MPL. 5 * 6 * For licencing information please see the file license.txt included with JGAP 7 * or have a look at the top of class org.jgap.Chromosome which representatively 8 * includes the JGAP license policy applicable for any file delivered with JGAP. 9 */ 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 21 extends java.io.Serializable { 22 /** String containing the CVS revision. Read out via reflection!*/ 23 final static String CVS_REVISION = "$Revision: 1.7 $"; 24 25 /** 26 * Check if a given allele value is valid for the given gene instance. 27 * 28 * @param a_gene the gene the given allele is to be validated for 29 * @param a_alleleValue the allele value to be validated 30 * @param a_chromosome the chromosome the gene is contained (or null, if 31 * unknown) 32 * @param a_geneIndex the index the gene is contained in the chromosome at, 33 * or -1 if unknown 34 * @return true: allele may be set for gene; false: validity check failed 35 * 36 * @author Klaus Meffert 37 * @since 2.0 38 */ 39 boolean verify(Gene a_gene, Object a_alleleValue, IChromosome a_chromosome, 40 int a_geneIndex); 41 } 42