@Test public void testDeselect() throws Exception { mWeek.select(LocalDate.parse("2014-08-01")); mWeek.deselect(LocalDate.parse("2014-07-29")); assertFalse(mWeek.isSelected()); for (Day day : mWeek.getDays()) { assertFalse(day.isSelected()); } }
@Override public void deselect(@NonNull LocalDate date) { if (date != null && getFrom().compareTo(date) <= 0 && getTo().compareTo(date) >= 0) { setSelected(false); for (Day day : mDays) { day.setSelected(false); } } }
Week extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && getFrom().compareTo(date) <= 0 && getTo().compareTo(date) >= 0) { setSelected(false); for (Day day : mDays) { day.setSelected(false); } } } }
Week extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && getFrom().compareTo(date) <= 0 && getTo().compareTo(date) >= 0) { setSelected(false); for (Day day : mDays) { day.setSelected(false); } } } Week(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                @Nullable LocalDate maxDate); }
Week extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && getFrom().compareTo(date) <= 0 && getTo().compareTo(date) >= 0) { setSelected(false); for (Day day : mDays) { day.setSelected(false); } } } Week(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                @Nullable LocalDate maxDate); @Override boolean hasNext(); @Override boolean hasPrev(); @Override boolean next(); @Override boolean prev(); @Override int getType(); @Override void deselect(@NonNull LocalDate date); @Override boolean select(@NonNull LocalDate date); @NonNull List<Day> getDays(); @Override void build(); }
Week extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && getFrom().compareTo(date) <= 0 && getTo().compareTo(date) >= 0) { setSelected(false); for (Day day : mDays) { day.setSelected(false); } } } Week(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                @Nullable LocalDate maxDate); @Override boolean hasNext(); @Override boolean hasPrev(); @Override boolean next(); @Override boolean prev(); @Override int getType(); @Override void deselect(@NonNull LocalDate date); @Override boolean select(@NonNull LocalDate date); @NonNull List<Day> getDays(); @Override void build();  }