protected class Options.DecimalOptionDef extends Options.OptionDef
mDefaultValues, mNumValuesNeeded| Constructor and Description |
|---|
DecimalOptionDef(String name,
BigDecimal defValue,
String desc)
Construct a BigDecimal option.
|
DecimalOptionDef(String name,
String desc)
Construct a BigDecimal option.
|
| Modifier and Type | Method and Description |
|---|---|
void |
validateOption(ArrayList values)
Ensure that this option has a single value that is a valid
BigDecimal.
|
getBigDecimal, getBoolean, getDate, getDefaultValues, getDesc, getInteger, getIthDefaultAsString, getName, getNumValuesNeeded, getString, getStrings, isRequiredOption, toStringpublic DecimalOptionDef(String name, BigDecimal defValue, String desc)
name - The name of the option. The name should include
the leading "-" (i.e. -coefficient).defValue - The default value to use if the option does not
appear on the command line.desc - The description of the option.public DecimalOptionDef(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. -coefficient).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 decimal value.CommandLineParser.OptionDataExceptionCopyright © 2003, 2023, Oracle and/or its affiliates.