@Test public void testEquals() throws Exception { Day day = new Day(mToday, true); assertTrue(mDay.equals(day)); assertTrue(day.equals(mDay)); assertEquals(day.hashCode(), mDay.hashCode()); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Day day = (Day) o; if (mEnabled != day.mEnabled) return false; if (mSelected != day.mSelected) return false; if (mToday != day.mToday) return false; if (!mDate.isEqual(day.mDate)) return false; return true; }
Day { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Day day = (Day) o; if (mEnabled != day.mEnabled) return false; if (mSelected != day.mSelected) return false; if (mToday != day.mToday) return false; if (!mDate.isEqual(day.mDate)) return false; return true; } }
Day { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Day day = (Day) o; if (mEnabled != day.mEnabled) return false; if (mSelected != day.mSelected) return false; if (mToday != day.mToday) return false; if (!mDate.isEqual(day.mDate)) return false; return true; } Day(@NonNull LocalDate date, boolean today); }
Day { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Day day = (Day) o; if (mEnabled != day.mEnabled) return false; if (mSelected != day.mSelected) return false; if (mToday != day.mToday) return false; if (!mDate.isEqual(day.mDate)) return false; return true; } Day(@NonNull LocalDate date, boolean today); @NonNull LocalDate getDate(); boolean isEnabled(); void setEnabled(boolean enabled); boolean isSelected(); void setSelected(boolean selected); boolean isCurrent(); void setCurrent(boolean current); boolean isToday(); @Override boolean equals(Object o); @Override int hashCode(); @NonNull String getText(); }
Day { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; Day day = (Day) o; if (mEnabled != day.mEnabled) return false; if (mSelected != day.mSelected) return false; if (mToday != day.mToday) return false; if (!mDate.isEqual(day.mDate)) return false; return true; } Day(@NonNull LocalDate date, boolean today); @NonNull LocalDate getDate(); boolean isEnabled(); void setEnabled(boolean enabled); boolean isSelected(); void setSelected(boolean selected); boolean isCurrent(); void setCurrent(boolean current); boolean isToday(); @Override boolean equals(Object o); @Override int hashCode(); @NonNull String getText();  }