1 10 package org.jgap.event; 11 12 import java.util.EventObject ; 13 14 23 public class GeneticEvent 24 extends EventObject { 25 26 private final static String CVS_REVISION = "$Revision: 1.8 $"; 27 28 31 private Object m_value; 32 33 37 public static final String GENOTYPE_EVOLVED_EVENT = 38 "genotype_evolved_event"; 39 40 public static final String GPGENOTYPE_EVOLVED_EVENT = 41 "gpgenotype_evolved_event"; 42 43 public static final String GPGENOTYPE_NEW_BEST_SOLUTION = 44 "gpgenotype_best_solution"; 45 46 49 private final String m_eventName; 50 51 64 public GeneticEvent(final String a_eventName, final Object a_source) { 65 super(a_source); 66 m_eventName = a_eventName; 67 } 68 69 83 public GeneticEvent(final String a_eventName, final Object a_source, 84 final Object a_value) { 85 this(a_eventName, a_source); 86 m_value = a_value; 87 } 88 89 98 public String getEventName() { 99 return m_eventName; 100 } 101 102 108 public Object getValue() { 109 return m_value; 110 } 111 } 112 | Popular Tags |