@Test public void testDeselect() throws Exception { mMonth.select(mToday); mMonth.deselect(mToday); assertFalse(mMonth.isSelected()); List<Week> weeks = mMonth.getWeeks(); for (int i = 0; i < weeks.size(); i++) { Week week = weeks.get(i); assertFalse(week.isSelected()); } }
@Override public void deselect(@NonNull LocalDate date) { if (date != null && isSelected() && isInView(date)) { for (Week week : mWeeks) { if (week.isSelected() && week.isIn(date)) { mSelectedIndex = -1; setSelected(false); week.deselect(date); } } } }
Month extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && isSelected() && isInView(date)) { for (Week week : mWeeks) { if (week.isSelected() && week.isIn(date)) { mSelectedIndex = -1; setSelected(false); week.deselect(date); } } } } }
Month extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && isSelected() && isInView(date)) { for (Week week : mWeeks) { if (week.isSelected() && week.isIn(date)) { mSelectedIndex = -1; setSelected(false); week.deselect(date); } } } } protected  Month(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                    @Nullable LocalDate maxDate); }
Month extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && isSelected() && isInView(date)) { for (Week week : mWeeks) { if (week.isSelected() && week.isIn(date)) { mSelectedIndex = -1; setSelected(false); week.deselect(date); } } } } protected  Month(@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<Week> getWeeks(); int getSelectedIndex(); @Override void build(); }
Month extends RangeUnit { @Override public void deselect(@NonNull LocalDate date) { if (date != null && isSelected() && isInView(date)) { for (Week week : mWeeks) { if (week.isSelected() && week.isIn(date)) { mSelectedIndex = -1; setSelected(false); week.deselect(date); } } } } protected  Month(@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<Week> getWeeks(); int getSelectedIndex(); @Override void build();  }