1 10 package org.jgap.supergenes; 11 12 import org.jgap.*; 13 14 20 public class InstantiableSupergeneForTest 21 extends AbstractSupergene { 22 23 private final static String CVS_REVISION = "$Revision: 1.3 $"; 24 25 public InstantiableSupergeneForTest(final Configuration a_config, 26 Gene[] a_genes) 27 throws InvalidConfigurationException { 28 super(a_config, a_genes); 29 } 30 31 public InstantiableSupergeneForTest(final Configuration a_config) 32 throws InvalidConfigurationException { 33 super(a_config, new Gene[] {}); 34 } 35 36 public InstantiableSupergeneForTest() 37 throws InvalidConfigurationException { 38 this(Genotype.getStaticConfiguration()); 39 } 40 41 public boolean isValid(Gene[] a_gene) { 42 return true; 43 }; 44 } 45 51 class TestValidator 52 extends Validator { 53 public TestValidator(final Configuration a_conf) { 54 super(a_conf); 55 } 56 57 public boolean isValid(Gene[] a_gene, Supergene a_supergene) { 58 return true; 59 } 60 } 61 | Popular Tags |