Attached is a patch that allows arguments to have specified a minimum and maximum number of values rather than just the previous "size". An example of use might be where you are selecting a number of files for an operation but want to ensure that at least one value was specified:
options.add( ArgumentBuilder .createBuilder() .withLongName("search-location") .withMinimumSize(1) .withMaximumSize(100) .withValueName("directory") .create()); ArgumentBuilder.withSize(int) has been retained and sets both min and max to the same. (This might be a bad thing if both size and min/max are specified though). ArgumentBuilder.withOptionalValues(boolean) has been removed since its a function of the min and max values. Argument.hasOptionalValues() has been retained and returns min<max Argument.getSize() has been removed and getMaximumSize() or getMinimumSize() should be used instead. Thoughts welcome. If you want me to commit it myself then I'll need access to jakarta-commons first. Rob Oh - and the extra testcase needs the apache licence attached, whoops.
ArgumentMinAndMaxSize.zip
Description: Zip compressed data
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]