code: public Calendar adjustDate(final Calendar startDate, final int increment, final NonWorkingDayChecker<Calendar> checker) {
           final Calendar cal = (Calendar) startDate.clone();
           int step = increment;
           final int month = cal.get(Calendar.MONTH);
  
           while (checker.isNonWorkingDay(cal)) {
               cal.add(Calendar.DAY_OF_MONTH, step);
               if (month != cal.get(Calendar.MONTH)) {
                   // switch direction and go back
                   step *= -1;
                   cal.add(Calendar.DAY_OF_MONTH, step);
               }
           }
  
           return cal;
       }
docs: -----------------------------------------------------------------------