1 16 package org.apache.cocoon.caching.validity; 17 18 import org.apache.excalibur.source.SourceValidity; 19 20 27 public class EventValidity implements SourceValidity { 28 29 private Event m_event; 30 31 35 public EventValidity(Event ev) { 36 m_event = ev; 37 } 38 39 44 public Event getEvent() { 45 return m_event; 46 } 47 48 52 public int isValid() { 53 return VALID; 54 } 55 56 59 public int isValid(SourceValidity sv) { 60 if (sv instanceof EventValidity) { 61 return VALID; 62 } 63 return INVALID; 64 } 65 66 67 public boolean equals(Object o) { 68 if (o instanceof EventValidity) { 69 return m_event.equals(((EventValidity)o).getEvent()); 70 } 71 return false; 72 } 73 74 public int hashCode() { 75 return m_event.hashCode(); 76 } 77 78 public String toString() { 79 return "EventValidity[" + m_event + "]"; 80 } 81 } 82 | Popular Tags |