@Override public boolean equals(Object o) { return o instanceof CalendarDay && date.equals(((CalendarDay) o).getDate()); }
/** * Clear the previous selection, select the range of days from first to last, and finally * invalidate. First day should be before last day, otherwise the selection won't happen. * * @param first The first day of the range. * @param last The last day in the range. * @see CalendarPagerAdapter#setDateSelected(CalendarDay, boolean) */ public void selectRange(final CalendarDay first, final CalendarDay last) { selectedDates.clear(); // Copy to start from the first day and increment LocalDate temp = LocalDate.of(first.getYear(), first.getMonth(), first.getDay()); // for comparison final LocalDate end = last.getDate(); while( temp.isBefore(end) || temp.equals(end) ) { selectedDates.add(CalendarDay.from(temp)); temp = temp.plusDays(1); } invalidateSelectedDates(); }
@Override // override for performance public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof JapaneseDate) { JapaneseDate otherDate = (JapaneseDate) obj; return this.isoDate.equals(otherDate.isoDate); } return false; }
@Override // override for performance public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof MinguoDate) { MinguoDate otherDate = (MinguoDate) obj; return this.isoDate.equals(otherDate.isoDate); } return false; }
@Override // override for performance public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof MinguoDate) { MinguoDate otherDate = (MinguoDate) obj; return this.isoDate.equals(otherDate.isoDate); } return false; }
@Override // override for performance public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof ThaiBuddhistDate) { ThaiBuddhistDate otherDate = (ThaiBuddhistDate) obj; return this.isoDate.equals(otherDate.isoDate); } return false; }
@Override // override for performance public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof ThaiBuddhistDate) { ThaiBuddhistDate otherDate = (ThaiBuddhistDate) obj; return this.isoDate.equals(otherDate.isoDate); } return false; }
@Override // override for performance public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof JapaneseDate) { JapaneseDate otherDate = (JapaneseDate) obj; return this.isoDate.equals(otherDate.isoDate); } return false; }
private MinguoDate with(LocalDate newDate) { return (newDate.equals(isoDate) ? this : new MinguoDate(newDate)); }
private ThaiBuddhistDate with(LocalDate newDate) { return (newDate.equals(isoDate) ? this : new ThaiBuddhistDate(newDate)); }
private ThaiBuddhistDate with(LocalDate newDate) { return (newDate.equals(isoDate) ? this : new ThaiBuddhistDate(newDate)); }
public boolean isSelectedDay(@NonNull LocalDate day) { return day.equals(getSelectedItem()); }
public boolean isToady(@NonNull LocalDate day) { return LocalDate.now().equals(day); }
private JapaneseDate with(LocalDate newDate) { return (newDate.equals(isoDate) ? this : new JapaneseDate(newDate)); }
private JapaneseDate with(LocalDate newDate) { return (newDate.equals(isoDate) ? this : new JapaneseDate(newDate)); }
private MinguoDate with(LocalDate newDate) { return (newDate.equals(isoDate) ? this : new MinguoDate(newDate)); }
/** * Checks if this date-time is equal to another date-time. * <p> * Compares this {@code LocalDateTime} with another ensuring that the date-time is the same. * Only objects of type {@code LocalDateTime} are compared, other types return false. * * @param obj the object to check, null returns false * @return true if this is equal to the other date-time */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof LocalDateTime) { LocalDateTime other = (LocalDateTime) obj; return date.equals(other.date) && time.equals(other.time); } return false; }
/** * Checks if this date-time is equal to another date-time. * <p> * Compares this {@code LocalDateTime} with another ensuring that the date-time is the same. * Only objects of type {@code LocalDateTime} are compared, other types return false. * * @param obj the object to check, null returns false * @return true if this is equal to the other date-time */ @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof LocalDateTime) { LocalDateTime other = (LocalDateTime) obj; return date.equals(other.date) && time.equals(other.time); } return false; }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null) { return false; } if (!(obj instanceof ScalarDate)) { return false; } ScalarDate other = (ScalarDate) obj; return this.getValue().equals(other.getValue()); }
@Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj == null) { return false; } if (!(obj instanceof KVDate)) { return false; } KVDate other = (KVDate) obj; return this.getValue().equals(other.getValue()); }