@Test public void testEquals() { CalendarDate first = CalendarDate.of(null, 1999, 1, 1, 1, 1, 1); CalendarDate second = CalendarDate.of(null, 1999, 1, 1, 1, 1, 1); assertThat(first).isEqualTo(second); assertThat(first.hashCode()).isEqualTo(second.hashCode()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CalendarDate)) return false; CalendarDate other = (CalendarDate) o; return other.cal == cal && other.dateTime.equals(dateTime); }
CalendarDate implements Comparable<CalendarDate> { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CalendarDate)) return false; CalendarDate other = (CalendarDate) o; return other.cal == cal && other.dateTime.equals(dateTime); } }
CalendarDate implements Comparable<CalendarDate> { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CalendarDate)) return false; CalendarDate other = (CalendarDate) o; return other.cal == cal && other.dateTime.equals(dateTime); } CalendarDate(Calendar cal, DateTime dateTime); }
CalendarDate implements Comparable<CalendarDate> { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CalendarDate)) return false; CalendarDate other = (CalendarDate) o; return other.cal == cal && other.dateTime.equals(dateTime); } CalendarDate(Calendar cal, DateTime dateTime); static CalendarDate present(); static CalendarDate present(Calendar cal); static CalendarDate of(Calendar cal, int year, int monthOfYear, int dayOfMonth, int hourOfDay,
      int minuteOfHour, int secondOfMinute); static CalendarDate withDoy(Calendar cal, int year, int doy, int hourOfDay, int minuteOfHour,
      int secondOfMinute); static CalendarDate of(java.util.Date date); static CalendarDate of(long msecs); static CalendarDate of(Calendar cal, long msecs); @Nullable static CalendarDate parseUdunitsOrIso(String calendarName, String isoOrUdunits); static CalendarDate parseISOformat(String calendarName, String isoDateString); static CalendarDate parseUdunits(String calendarName, String udunits); Calendar getCalendar(); long getMillis(); @Override int compareTo(CalendarDate o); boolean isAfter(CalendarDate o); boolean isBefore(CalendarDate o); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String getTimeUnits(); int getHourOfDay(); int getFieldValue(CalendarPeriod.Field fld); int getDayOfMonth(); @Deprecated CalendarDate add(double value, CalendarPeriod.Field unit); CalendarDate add(CalendarPeriod period); CalendarDate subtract(CalendarPeriod period); CalendarDate truncate(CalendarPeriod.Field fld); java.util.Date toDate(); long getDifferenceInMsecs(CalendarDate o); long getDifference(CalendarDate o, CalendarPeriod.Field fld); GregorianCalendar toGregorianCalendar(); }
CalendarDate implements Comparable<CalendarDate> { @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof CalendarDate)) return false; CalendarDate other = (CalendarDate) o; return other.cal == cal && other.dateTime.equals(dateTime); } CalendarDate(Calendar cal, DateTime dateTime); static CalendarDate present(); static CalendarDate present(Calendar cal); static CalendarDate of(Calendar cal, int year, int monthOfYear, int dayOfMonth, int hourOfDay,
      int minuteOfHour, int secondOfMinute); static CalendarDate withDoy(Calendar cal, int year, int doy, int hourOfDay, int minuteOfHour,
      int secondOfMinute); static CalendarDate of(java.util.Date date); static CalendarDate of(long msecs); static CalendarDate of(Calendar cal, long msecs); @Nullable static CalendarDate parseUdunitsOrIso(String calendarName, String isoOrUdunits); static CalendarDate parseISOformat(String calendarName, String isoDateString); static CalendarDate parseUdunits(String calendarName, String udunits); Calendar getCalendar(); long getMillis(); @Override int compareTo(CalendarDate o); boolean isAfter(CalendarDate o); boolean isBefore(CalendarDate o); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); String getTimeUnits(); int getHourOfDay(); int getFieldValue(CalendarPeriod.Field fld); int getDayOfMonth(); @Deprecated CalendarDate add(double value, CalendarPeriod.Field unit); CalendarDate add(CalendarPeriod period); CalendarDate subtract(CalendarPeriod period); CalendarDate truncate(CalendarPeriod.Field fld); java.util.Date toDate(); long getDifferenceInMsecs(CalendarDate o); long getDifference(CalendarDate o, CalendarPeriod.Field fld); GregorianCalendar toGregorianCalendar(); static final CalendarDate UNKNOWN; static final double MILLISECS_IN_SECOND; static final double MILLISECS_IN_MINUTE; static final double MILLISECS_IN_HOUR; static final double MILLISECS_IN_DAY; static final double MILLISECS_IN_YEAR; static final double MILLISECS_IN_MONTH; }