org.jgap.supergenes
Class Validator
- java.lang.Object
-
- org.jgap.supergenes.Validator
-
- All Implemented Interfaces:
- SupergeneValidator
public abstract class Validator extends java.lang.Object implements SupergeneValidator
The abstract supergeneValidator, hiding the getPersisten() and setFromPersistent() methods that are not always required.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor and Description Validator(Configuration a_conf)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description ConfigurationgetConfiguration()java.lang.StringgetPersistent()The default implementation returns an empty string.abstract booleanisValid(Gene[] a_genes, Supergene a_for_supergene)Return true if this gene combination is valid for the given supergenevoidsetFromPersistent(java.lang.String a_from)Set a persistend string representation (if needed) for this validator.
-
-
-
Constructor Detail
-
Validator
public Validator(Configuration a_conf)
-
-
Method Detail
-
isValid
public abstract boolean isValid(Gene[] a_genes, Supergene a_for_supergene)
Return true if this gene combination is valid for the given supergene- Specified by:
isValidin interfaceSupergeneValidator
-
getPersistent
public java.lang.String getPersistent()
The default implementation returns an empty string.- Specified by:
getPersistentin interfaceSupergeneValidator- 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
public void setFromPersistent(java.lang.String a_from)
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. The default implementation does nothing.- Specified by:
setFromPersistentin interfaceSupergeneValidator
-
getConfiguration
public Configuration getConfiguration()
- Returns:
- the configuration used
- Since:
- 3.0
-
-
DMelt 3.0 © DataMelt by jWork.ORG