KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jgap > supergenes > SupergeneValidator


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.supergenes;
11
12 import org.jgap.Gene;
13
14 /**
15  * A class, deciding, if the supergene allele combination is valid.
16  * Some classes Supergenes (like abstractSupergene) also implement
17  * supergeneValidator, deciding themselfs about the gene validity.
18  * In request to returs a validator, they return <i>this</i>.
19  * Other classes may require always to set the external validator.
20  *
21  * @author Audrius Meskauskas
22  * @since 2.0
23  */

24 public interface SupergeneValidator {
25   /** String containing the CVS revision. Read out via reflection!*/
26   final static String JavaDoc CVS_REVISION = "$Revision: 1.2 $";
27
28   /**
29    * Return true if this gene combination is valid for
30    * the given supergene */

31   boolean isValid(Gene[] a_genes, Supergene a_for_supergene);
32
33   /**
34    * @return persistent string representation (if needed) of this validator.
35    * The method name is different allowing the same class to implement both
36    * Supergene and supergeneValidator.
37    * */

38   String JavaDoc getPersistent();
39
40   /**
41    * Set a persistend string representation (if needed) for this validator.
42    * The method name is different allowing the same class to implement both
43    * Supergene and supergeneValidator.
44    */

45
46   void setFromPersistent(String JavaDoc a_string);
47 }
48
Popular Tags