private boolean[] parseRange(String range,int rangeMin,int rangeMax) throws ConfigException {
  boolean[] values=new boolean[rangeMax + 1];
  int j=0;
  while (j < range.length()) {
    char ch=range.charAt(j);
    int min=0;
    int max=0;
    int step=1;
    if (ch == '*') {
      min=rangeMin;
      max=rangeMax;
      j++;
    }
 else     if ('0' <= ch && ch <= '9') {
      for (; j < range.length() && '0' <= (ch=range.charAt(j)) && ch <= '9'; j++) {
        min=10 * min + ch - '0';
      }
      if (j < range.length() && ch == '-') {
        for (j++; j < range.length() && '0' <= (ch=range.charAt(j)) && ch <= '9'; j++) {
          max=10 * max + ch - '0';
        }
      }
 else       max=min;
    }
 else     throw new ConfigException(L.l("'{0}' is an illegal cron range",range));
    if (min < rangeMin)     throw new ConfigException(L.l("'{0}' is an illegal cron range (min value is too small)",range));
 else     if (rangeMax < max)     throw new ConfigException(L.l("'{0}' is an illegal cron range (max value is too large)",range));
    if (j < range.length() && (ch=range.charAt(j)) == '/') {
      step=0;
      for (j++; j < range.length() && '0' <= (ch=range.charAt(j)) && ch <= '9'; j++) {
        step=10 * step + ch - '0';
      }
      if (step == 0)       throw new ConfigException(L.l("'{0}' is an illegal cron range",range));
    }
    if (range.length() <= j) {
    }
 else     if (ch == ',')     j++;
 else {
      throw new ConfigException(L.l("'{0}' is an illegal cron range",range));
    }
    for (; min <= max; min+=step)     values[min]=true;
  }
  return values;
}

private boolean [ ] parseRange ( String range , int rangeMin , int rangeMax ) throws ConfigException { boolean [ ] values = new boolean [ rangeMax + 1 ] ; int j = 0 ; while ( j < range . length ( ) ) { char ch = range . charAt ( j ) ; int min = 0 ; int max = 0 ; int step = 1 ; if ( ch == '*' ) { min = rangeMin ; max = rangeMax ; j ++ ; } else if ( '0' <= ch && ch <= '9' ) { for ( ; j < range . length ( ) && '0' <= ( ch = range . charAt ( j ) ) && ch <= '9' ; j ++ ) { min = 10 * min + ch - '0' ; } if ( j < range . length ( ) && ch == '-' ) { for ( j ++ ; j < range . length ( ) && '0' <= ( ch = range . charAt ( j ) ) && ch <= '9' ; j ++ ) { max = 10 * max + ch - '0' ; } } else max = min ; } else throw new ConfigException ( L . l ( "'{0}' is an illegal cron range" , range ) ) ; if ( min < rangeMin ) throw new ConfigException ( L . l ( "'{0}' is an illegal cron range (min value is too small)" , range ) ) ; else if ( rangeMax < max ) throw new ConfigException ( L . l ( "'{0}' is an illegal cron range (max value is too large)" , range ) ) ; if ( j < range . length ( ) && ( ch = range . charAt ( j ) ) == '/' ) { step = 0 ; for ( j ++ ; j < range . length ( ) && '0' <= ( ch = range . charAt ( j ) ) && ch <= '9' ; j ++ ) { step = 10 * step + ch - '0' ; } if ( step == 0 ) throw new ConfigException ( L . l ( "'{0}' is an illegal cron range" , range ) ) ; } if ( range . length ( ) <= j ) { } else if ( ch == ',' ) j ++ ; else { throw new ConfigException ( L . l ( "'{0}' is an illegal cron range" , range ) ) ; } for ( ; min <= max ; min += step ) values [ min ] = true ; } return values ; }
parses a range , following cron rules .
