1 10 package org.jgap; 11 12 import java.util.*; 13 14 20 public abstract class BaseGeneticOperator 21 implements GeneticOperator, Comparable { 22 23 private final static String CVS_REVISION = "$Revision: 1.4 $"; 24 25 private Configuration m_configuration; 26 27 34 public BaseGeneticOperator(Configuration a_configuration) 35 throws InvalidConfigurationException { 36 if (a_configuration == null) { 37 throw new InvalidConfigurationException("Configuration to set may not be" 38 +" null!"); 39 } 40 m_configuration = a_configuration; 41 } 42 43 50 public Configuration getConfiguration() { 51 return m_configuration; 52 } 53 54 65 public boolean equals(final Object a_other) { 66 try { 67 68 return compareTo(a_other) == 0; 69 } 70 catch (ClassCastException cex) { 71 return false; 72 } 73 } 74 75 } 76 | Popular Tags |