1 17 18 19 20 package org.apache.lenya.workflow.impl; 21 22 import org.apache.lenya.workflow.Event; 23 24 25 28 public class EventImpl implements Event { 29 30 34 protected EventImpl(String eventName) { 35 name = eventName; 36 } 37 38 private String name; 39 40 44 public String toString() { 45 return getName(); 46 } 47 48 51 public boolean equals(Object otherObject) { 52 boolean equals = false; 53 54 if (otherObject instanceof EventImpl) { 55 EventImpl otherEvent = (EventImpl) otherObject; 56 equals = getName().equals(otherEvent.getName()); 57 } else { 58 equals = super.equals(otherObject); 59 } 60 61 return equals; 62 } 63 64 67 public int hashCode() { 68 return getName().hashCode(); 69 } 70 71 74 public String getName() { 75 return name; 76 } 77 } 78 | Popular Tags |