protected class Options.IntOptionDef extends Options.OptionDef
mDefaultValues, mNumValuesNeeded| Constructor and Description |
|---|
IntOptionDef(String name,
int defValue,
String desc)
Construct an integer option.
|
IntOptionDef(String name,
String desc)
Construct an integer option.
|
| Modifier and Type | Method and Description |
|---|---|
void |
validateOption(ArrayList values)
Ensure that this option has a single value that is a valid
integer.
|
getBigDecimal, getBoolean, getDate, getDefaultValues, getDesc, getInteger, getIthDefaultAsString, getName, getNumValuesNeeded, getString, getStrings, isRequiredOption, toStringpublic IntOptionDef(String name, int defValue, String desc)
name - The name of the option. The name should include
the leading "-" (i.e. -threads).defValue - The default value to use if the option does not
appear on the command line.desc - The description of the option.public IntOptionDef(String name, String desc)
parse method will
throw an exception if the option does not appear on the command
line.
name - The name of the option. The name should include
the leading "-" (i.e. -threads).desc - The description of the option.public void validateOption(ArrayList values) throws CommandLineParser.OptionDataException
validateOption in class Options.OptionDefvalues - An array that contains the values that were specified
on the command line for the option. If no values were specified
then the array will be empty.OptionDataException - There was not only one value that
is a valid integer.CommandLineParser.OptionDataExceptionCopyright © 2003, 2023, Oracle and/or its affiliates.