@Override public List<Period> generatePeriods(DateTimeUnit dateTimeUnit){
  Calendar calendar=getCalendar();
  dateTimeUnit=calendar.minusYears(dateTimeUnit,5);
  dateTimeUnit.setDay(1);
  dateTimeUnit.setMonth(1);
  List<Period> periods=Lists.newArrayList();
  for (int i=0; i < 11; ++i) {
    periods.add(createPeriod(dateTimeUnit,calendar));
    dateTimeUnit=calendar.plusYears(dateTimeUnit,1);
  }
  return periods;
}

@ Override public List < Period > generatePeriods ( DateTimeUnit dateTimeUnit ) { Calendar calendar = getCalendar ( ) ; dateTimeUnit = calendar . minusYears ( dateTimeUnit , 5 ) ; dateTimeUnit . setDay ( 1 ) ; dateTimeUnit . setMonth ( 1 ) ; List < Period > periods = Lists . newArrayList ( ) ; for ( int i = 0 ; i < 11 ; ++ i ) { periods . add ( createPeriod ( dateTimeUnit , calendar ) ) ; dateTimeUnit = calendar . plusYears ( dateTimeUnit , 1 ) ; } return periods ; }
generates yearly periods for the last 5 , current and next 5 years .
