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" ) ; } }
Sets the occurence .