public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Scheduled other = (Scheduled) obj; if (!event.equals(other.event)) return false; return runnable.equals(other.runnable); }
public int hashCode() { return 31 * (31 + event.hashCode()) + runnable.hashCode(); }