question: private int [ ] createEpochMonths ( int epochDay , int minYear , int maxYear , Map < Integer , int [ ] > years ) { int numMonths = ( maxYear - minYear + 1 ) * 12 + 1 ; int epochMonth = 0 ; int [ ] epochMonths = new int [ numMonths ] ; minMonthLength = Integer . MAX_VALUE ; maxMonthLength = Integer . MIN_VALUE ; for ( int year = minYear ; year <= maxYear ; year ++ ) { int [ ] months = years . get ( year ) ; for ( int month = 0 ; month < 12 ; month ++ ) { int length = months [ month ] ; epochMonths [ epochMonth ++ ] = epochDay ; if ( length < 29 || length > 32 ) { throw new IllegalArgumentException ( "Invalid month length in year: " + minYear ) ; } epochDay += length ; minMonthLength = Math . min ( minMonthLength , length ) ; maxMonthLength = Math . max ( maxMonthLength , length ) ; } } epochMonths [ epochMonth ++ ] = epochDay ; if ( epochMonth != epochMonths . length ) { throw new IllegalStateException ( "Did not fill epochMonths exactly: ndx = " + epochMonth + " should be " + epochMonths . length ) ; } return epochMonths ; }
target:  Converts the map of year to month lengths ranging from minYear to maxYear into a linear contiguous array of epochDays. The index is the hijrahMonth computed from year and month and offset by minYear. The value of each entry is the epochDay corresponding to the first day of the month.