public int compareTo(Object o) { TaskEventId key = (TaskEventId) o; int diff = theTaskUID.compareTo(key.theTaskUID); if (diff == 0) { diff = theAspectType - key.theAspectType; } return diff; }