this.task = task; this.priority = priority;
int c = priority.compareTo(pt.priority); return c != 0 ? c : task.compareTo(pt.task);
if (o instanceof PriorityTask) { PriorityTask pt = (PriorityTask)o; return task.equals(pt.task) && priority.equals(pt.priority); } else return false;
return priority;
return task;
return task.hashCode();
return task + ": " + priority;