static Generator byMonthGenerator(int[] months, final DateValue dtStart) {
        final int[] umonths = Util.uniquify(months);

        return new Generator() {
            int i;
            int year = dtStart.year();

            @Override
            boolean generate(DTBuilder builder) {
                if (year != builder.year) {
                    i = 0;
                    year = builder.year;
                }
                if (i >= umonths.length) {
                    return false;
                }
                builder.month = umonths[i++];
                return true;
            }

            @Override
            public String toString() {
                return "byMonthGenerator:" + Arrays.toString(umonths);
            }
        };
    }
static Generator byMonthGenerator ( int [ ] months , final DateValue dtStart ) { final int [ ] umonths = Util . uniquify ( months ) ; return new Generator ( ) { int i ; int year = dtStart . year ( ) ; @ Override boolean generate ( DTBuilder builder ) { if ( year != builder . year ) { i = 0 ; year = builder . year ; } if ( i >= umonths . length ) { return false ; } builder . month = umonths [ i ++ ] ; return true ; } @ Override public String toString ( ) { return "byMonthGenerator:" + Arrays . toString ( umonths ) ; } } ; }
constructs a generator that yields the specified months in increasing order
for each year.
@param months values in [1-12]
@param dtStart non null