import java.io.Serializable; /** * A 'cookie' to record who the listener is and what they're interested in being * informed about. * * @author Cormac Redmond -- credmond85 /at/ gmail */ public class CancellationCookie implements Serializable { int hour; int day; int week; long eventType; String roomCode; CancellationCookie(int hour, int day, int week, String roomCode, long eventType) { this.hour = hour; this.day = day; this.week = week; this.roomCode = roomCode; this.eventType = eventType; } public boolean equals(Object other) { if (!(other instanceof CancellationCookie)) return false; CancellationCookie cookie = (CancellationCookie) other; return cookie.hour == hour && cookie.eventType == eventType && cookie.day == day && cookie.week == week && roomCode.equals(cookie.roomCode); } }