public int compareTo(HolidayId o) { Validate.notNull(o, "HolidayId to be compared cannot be null"); int result = date - o.date; if (0 == result) { result = financialCalendar.getId().compareTo(o.financialCalendar.getId()); } return result; }
@Override public String toString() { return "" + date + "|" + ((null != financialCalendar) ? financialCalendar.getId() : "???"); }