org.jgap.supergenes
Class nonValidatingSupergene

java.lang.Object
  extended byorg.jgap.supergenes.abstractSupergene
      extended byorg.jgap.supergenes.nonValidatingSupergene
All Implemented Interfaces:
java.lang.Comparable, Gene, java.io.Serializable, Supergene, supergeneValidator

public class nonValidatingSupergene
extends abstractSupergene

A supergene that is always valid. This is only needed for some special cases.

Version:
1.0
Author:
Audrius Meskauskas
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jgap.supergenes.abstractSupergene
GENE_DELIMITER, GENE_DELIMITER_CLOSING, GENE_DELIMITER_HEADING, MAX_IMMUTABLE_GENES, MAX_RETRIES
 
Fields inherited from interface org.jgap.Gene
PERSISTENT_FIELD_DELIMITER
 
Constructor Summary
nonValidatingSupergene()
           
nonValidatingSupergene(Gene[] a_genes)
           
 
Method Summary
 boolean isValid()
          Always true
 boolean isValid(Gene[] a, Supergene a_for)
          Always true
 
Methods inherited from class org.jgap.supergenes.abstractSupergene
addGene, applyMutation, cleanup, compareTo, equals, getAllele, getGene, getGenes, getPersistent, getPersistentRepresentation, getValidator, hashCode, newGene, reset, setAllele, setFromPersistent, setToRandomValue, setValidator, setValueFromPersistentRepresentation, size, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

nonValidatingSupergene

public nonValidatingSupergene()

nonValidatingSupergene

public nonValidatingSupergene(Gene[] a_genes)
Method Detail

isValid

public final boolean isValid(Gene[] a,
                             Supergene a_for)
Always true

Specified by:
isValid in interface supergeneValidator
Overrides:
isValid in class abstractSupergene
Returns:
true only if the supergene allele combination is valid.

isValid

public final boolean isValid()
Always true

Specified by:
isValid in interface Supergene
Overrides:
isValid in class abstractSupergene
Returns:
true only if the supergene allele combination is valid or the setValidator (null) has been previously called.