@Test public void testHasNextYear() throws Exception { LocalDate max = LocalDate.parse("2015-10-08"); Month week = new Month(mToday, mToday, null, max); assertTrue(week.hasNext()); }
@Override public boolean hasNext() { LocalDate maxDate = getMaxDate(); if (maxDate == null) { return true; } else { LocalDate to = getTo(); int year = maxDate.getYear(); int yearTo = to.getYear(); int month = maxDate.getMonthOfYear(); int monthTo = to.getMonthOfYear(); return year > yearTo || (year == yearTo && month > monthTo); } }
Month extends RangeUnit { @Override public boolean hasNext() { LocalDate maxDate = getMaxDate(); if (maxDate == null) { return true; } else { LocalDate to = getTo(); int year = maxDate.getYear(); int yearTo = to.getYear(); int month = maxDate.getMonthOfYear(); int monthTo = to.getMonthOfYear(); return year > yearTo || (year == yearTo && month > monthTo); } } }
Month extends RangeUnit { @Override public boolean hasNext() { LocalDate maxDate = getMaxDate(); if (maxDate == null) { return true; } else { LocalDate to = getTo(); int year = maxDate.getYear(); int yearTo = to.getYear(); int month = maxDate.getMonthOfYear(); int monthTo = to.getMonthOfYear(); return year > yearTo || (year == yearTo && month > monthTo); } } protected  Month(@NonNull LocalDate date, @NonNull LocalDate today, @Nullable LocalDate minDate,
                    @Nullable LocalDate maxDate); }
Month extends RangeUnit { @Override public boolean hasNext() { LocalDate maxDate = getMaxDate(); if (maxDate == null) { return true; } else { LocalDate to = getTo(); int year = maxDate.getYear(); int yearTo = to.getYear(); int month = maxDate.getMonthOfYear(); int monthTo = to.getMonthOfYear(); return year > yearTo || (year == yearTo && month > monthTo); } } 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 boolean hasNext() { LocalDate maxDate = getMaxDate(); if (maxDate == null) { return true; } else { LocalDate to = getTo(); int year = maxDate.getYear(); int yearTo = to.getYear(); int month = maxDate.getMonthOfYear(); int monthTo = to.getMonthOfYear(); return year > yearTo || (year == yearTo && month > monthTo); } } 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();  }