JGAP

org.jgap.supergenes
Interface SupergeneValidator

All Known Implementing Classes:
AbstractSupergene, NickelsPenniesSupergene, Validator

public interface SupergeneValidator

A class, deciding, if the supergene allele combination is valid. Some classes Supergenes (like abstractSupergene) also implement supergeneValidator, deciding themselfs about the gene validity. In request to returs a validator, they return this. Other classes may require always to set the external validator.

Since:
2.0

Field Summary
static java.lang.String CVS_REVISION
          String containing the CVS revision.
 
Method Summary
 java.lang.String getPersistent()
           
 boolean isValid(Gene[] a_genes, Supergene a_for_supergene)
          Return true if this gene combination is valid for the given supergene
 void setFromPersistent(java.lang.String a_string)
          Set a persistend string representation (if needed) for this validator.
 

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

isValid

boolean isValid(Gene[] a_genes,
                Supergene a_for_supergene)
Return true if this gene combination is valid for the given supergene


getPersistent

java.lang.String getPersistent()
Returns:
persistent string representation (if needed) of this validator. The method name is different allowing the same class to implement both Supergene and supergeneValidator.

setFromPersistent

void setFromPersistent(java.lang.String a_string)
Set a persistend string representation (if needed) for this validator. The method name is different allowing the same class to implement both Supergene and supergeneValidator.


JGAP