1 16 package org.apache.cocoon.caching.validity; 17 18 25 public class NamedEvent extends Event { 26 27 private String m_name; 28 private int m_hashcode; 29 30 35 public NamedEvent(String name) { 36 m_name = name; 37 m_hashcode = name.hashCode(); 38 } 39 40 44 public boolean equals(Event e) { 45 if (e instanceof NamedEvent) { 46 return m_name.equals(((NamedEvent)e).m_name); 47 } 48 return false; 49 } 50 51 public int hashCode() { 52 return m_hashcode; 53 } 54 55 public String toString() { 56 return "NamedEvent[" + m_name + "]"; 57 } 58 } 59 | Popular Tags |