private void decodeLength(String[] arguments,int startPos,int lineNumber,List<LocalizableMessage> warnings) throws DecodeException {
  int numArgs=arguments.length - startPos + 1;
  if (numArgs == 2) {
    randomType=RandomType.CHARS_FIXED;
    try {
      minLength=Integer.parseInt(arguments[startPos]);
      if (minLength < 0) {
        LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_INTEGER_BELOW_LOWER_BOUND.get(minLength,0,getName(),lineNumber);
        throw DecodeException.fatalError(message);
      }
 else       if (minLength == 0) {
        LocalizableMessage message=WARN_ENTRY_GENERATOR_TAG_WARNING_EMPTY_VALUE.get(lineNumber);
        warnings.add(message);
      }
    }
 catch (    NumberFormatException nfe) {
      LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_CANNOT_PARSE_AS_INTEGER.get(arguments[startPos],getName(),lineNumber);
      throw DecodeException.fatalError(message,nfe);
    }
  }
 else   if (numArgs == 3) {
    randomType=RandomType.CHARS_VARIABLE;
    try {
      minLength=Integer.parseInt(arguments[startPos]);
      if (minLength < 0) {
        LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_INTEGER_BELOW_LOWER_BOUND.get(minLength,0,getName(),lineNumber);
        throw DecodeException.fatalError(message);
      }
    }
 catch (    NumberFormatException nfe) {
      LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_CANNOT_PARSE_AS_INTEGER.get(arguments[startPos],getName(),lineNumber);
      throw DecodeException.fatalError(message,nfe);
    }
    try {
      maxLength=Integer.parseInt(arguments[startPos + 1]);
      lengthRange=maxLength - minLength + 1;
      if (maxLength < minLength) {
        LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_INTEGER_BELOW_LOWER_BOUND.get(maxLength,minLength,getName(),lineNumber);
        throw DecodeException.fatalError(message);
      }
 else       if (maxLength == 0) {
        LocalizableMessage message=WARN_ENTRY_GENERATOR_TAG_WARNING_EMPTY_VALUE.get(lineNumber);
        warnings.add(message);
      }
    }
 catch (    NumberFormatException nfe) {
      LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_CANNOT_PARSE_AS_INTEGER.get(arguments[startPos + 1],getName(),lineNumber);
      throw DecodeException.fatalError(message,nfe);
    }
  }
 else {
    LocalizableMessage message=ERR_ENTRY_GENERATOR_TAG_INVALID_ARGUMENT_RANGE_COUNT.get(getName(),lineNumber,startPos + 1,startPos + 2,numArgs);
    throw DecodeException.fatalError(message);
  }
}

private void decodeLength ( String [ ] arguments , int startPos , int lineNumber , List < LocalizableMessage > warnings ) throws DecodeException { int numArgs = arguments . length - startPos + 1 ; if ( numArgs == 2 ) { randomType = RandomType . CHARS_FIXED ; try { minLength = Integer . parseInt ( arguments [ startPos ] ) ; if ( minLength < 0 ) { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_INTEGER_BELOW_LOWER_BOUND . get ( minLength , 0 , getName ( ) , lineNumber ) ; throw DecodeException . fatalError ( message ) ; } else if ( minLength == 0 ) { LocalizableMessage message = WARN_ENTRY_GENERATOR_TAG_WARNING_EMPTY_VALUE . get ( lineNumber ) ; warnings . add ( message ) ; } } catch ( NumberFormatException nfe ) { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_CANNOT_PARSE_AS_INTEGER . get ( arguments [ startPos ] , getName ( ) , lineNumber ) ; throw DecodeException . fatalError ( message , nfe ) ; } } else if ( numArgs == 3 ) { randomType = RandomType . CHARS_VARIABLE ; try { minLength = Integer . parseInt ( arguments [ startPos ] ) ; if ( minLength < 0 ) { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_INTEGER_BELOW_LOWER_BOUND . get ( minLength , 0 , getName ( ) , lineNumber ) ; throw DecodeException . fatalError ( message ) ; } } catch ( NumberFormatException nfe ) { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_CANNOT_PARSE_AS_INTEGER . get ( arguments [ startPos ] , getName ( ) , lineNumber ) ; throw DecodeException . fatalError ( message , nfe ) ; } try { maxLength = Integer . parseInt ( arguments [ startPos + 1 ] ) ; lengthRange = maxLength - minLength + 1 ; if ( maxLength < minLength ) { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_INTEGER_BELOW_LOWER_BOUND . get ( maxLength , minLength , getName ( ) , lineNumber ) ; throw DecodeException . fatalError ( message ) ; } else if ( maxLength == 0 ) { LocalizableMessage message = WARN_ENTRY_GENERATOR_TAG_WARNING_EMPTY_VALUE . get ( lineNumber ) ; warnings . add ( message ) ; } } catch ( NumberFormatException nfe ) { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_CANNOT_PARSE_AS_INTEGER . get ( arguments [ startPos + 1 ] , getName ( ) , lineNumber ) ; throw DecodeException . fatalError ( message , nfe ) ; } } else { LocalizableMessage message = ERR_ENTRY_GENERATOR_TAG_INVALID_ARGUMENT_RANGE_COUNT . get ( getName ( ) , lineNumber , startPos + 1 , startPos + 2 , numArgs ) ; throw DecodeException . fatalError ( message ) ; } }
decodes the information in the provided argument list as either a single integer specifying the number of characters , or two integers specifying the minimum and maximum number of characters .
