Esempio n. 1
0
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    ScheduledEvent that = (ScheduledEvent) o;

    if (schedule != null ? !schedule.equals(that.schedule) : that.schedule != null) return false;
    if (source != null ? !source.equals(that.source) : that.source != null) return false;
    if (timeStamp != null ? !timeStamp.equals(that.timeStamp) : that.timeStamp != null)
      return false;

    return true;
  }
Esempio n. 2
0
 public int hashCode() {
   int result = source != null ? source.hashCode() : 0;
   result = 31 * result + (timeStamp != null ? timeStamp.hashCode() : 0);
   result = 31 * result + (schedule != null ? schedule.hashCode() : 0);
   return result;
 }
Esempio n. 3
0
 private static Date createDefensiveCopyOf(Date date) {
   return new Date(date.getTime());
 }