code: static Generator byYearGenerator(int[] years, final DateValue dtStart) {
          final int[] uyears = Util.uniquify(years);
  
          // index into years
          return new Generator() {
              int i;
  
              {
                  while (i < uyears.length && dtStart.year() > uyears[i]) {
                      ++i;
                  }
              }
  
              @Override
              boolean generate(DTBuilder builder) {
                  if (i >= uyears.length) {
                      return false;
                  }
                  builder.year = uyears[i++];
                  return true;
              }
  
              @Override
              public String toString() {
                  return "byYearGenerator";
              }
          };
      }
docs: constructs a generator that yields the specified years in increasing order.