code: public void setOccurence(int min, int max) throws ParseException {
      if (!simplified) {
        if ((min < 0) || (min > max) || (max < 1)) {
          throw new ParseException("Illegal number {" + min + "," + max + "}");
        }
        if (min == 0) {
          optional = true;
        }
        minimumOccurence = Math.max(1, min);
        maximumOccurence = max;
      } else {
        throw new ParseException("already simplified");
      }
    }
docs: Sets the occurence.
  
  @param min the min
  @param max the max
  @throws ParseException the parse exception