@Test public void testNextYears() throws Exception { calendarBuilder.nextYears(1); Date resultTime = calendarBuilder.getResultTime(); Date time = calendarBuilder.getTime(); Assert.isTrue(resultTime.getTime() - time.getTime() == 365 * CalendarHelper.DAY); System.out.println(time); System.out.println(resultTime); }
public CalendarBuilder nextYears(int plusYears) { calculateCalendar.add(Calendar.YEAR, plusYears); return this; }
CalendarBuilder { public CalendarBuilder nextYears(int plusYears) { calculateCalendar.add(Calendar.YEAR, plusYears); return this; } }
CalendarBuilder { public CalendarBuilder nextYears(int plusYears) { calculateCalendar.add(Calendar.YEAR, plusYears); return this; } private  CalendarBuilder(); }
CalendarBuilder { public CalendarBuilder nextYears(int plusYears) { calculateCalendar.add(Calendar.YEAR, plusYears); return this; } private  CalendarBuilder(); static CalendarBuilder newBuilder(Date date); static CalendarBuilder newBuilder(); CalendarBuilder time(Date date); CalendarBuilder nextMilliSeconds(int plusMilliSeconds); CalendarBuilder nextSeconds(int plusSeconds); CalendarBuilder nextMinutes(int plusMinutes); CalendarBuilder nextHours(int plusHours); CalendarBuilder nextDays(int plusDays); CalendarBuilder nextWeeks(int plusWeeks); CalendarBuilder nextMonths(int plusMonths); CalendarBuilder nextYears(int plusYears); CalendarBuilder next(int field, int plus); Calendar getCalendar(); void setCalendar(Calendar calendar); Calendar getCalculateCalendar(); void setCalculateCalendar(Calendar calculateCalendar); Date getResultTime(); Date getTime(); }
CalendarBuilder { public CalendarBuilder nextYears(int plusYears) { calculateCalendar.add(Calendar.YEAR, plusYears); return this; } private  CalendarBuilder(); static CalendarBuilder newBuilder(Date date); static CalendarBuilder newBuilder(); CalendarBuilder time(Date date); CalendarBuilder nextMilliSeconds(int plusMilliSeconds); CalendarBuilder nextSeconds(int plusSeconds); CalendarBuilder nextMinutes(int plusMinutes); CalendarBuilder nextHours(int plusHours); CalendarBuilder nextDays(int plusDays); CalendarBuilder nextWeeks(int plusWeeks); CalendarBuilder nextMonths(int plusMonths); CalendarBuilder nextYears(int plusYears); CalendarBuilder next(int field, int plus); Calendar getCalendar(); void setCalendar(Calendar calendar); Calendar getCalculateCalendar(); void setCalculateCalendar(Calendar calculateCalendar); Date getResultTime(); Date getTime();  }