Package jargs.gnu
Class CmdLineParser.Option.DoubleOption
java.lang.Object
jargs.gnu.CmdLineParser.Option
jargs.gnu.CmdLineParser.Option.DoubleOption
- All Implemented Interfaces:
Serializable
- Enclosing class:
CmdLineParser.Option
An option that expects a floating-point value.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class jargs.gnu.CmdLineParser.Option
CmdLineParser.Option.BooleanOption, CmdLineParser.Option.DoubleOption, CmdLineParser.Option.IntegerOption, CmdLineParser.Option.LongOption, CmdLineParser.Option.StringOption
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleOption
(char shortForm, String longForm) Instantiates a new double option.DoubleOption
(String longForm) Instantiates a new double option. -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
parseValue
(String arg, Locale locale) Override to extract and convert an option value passed on the command-line.Methods inherited from class jargs.gnu.CmdLineParser.Option
getValue, longForm, shortForm, wantsValue
-
Constructor Details
-
DoubleOption
Instantiates a new double option.- Parameters:
shortForm
- the short formlongForm
- the long form
-
DoubleOption
Instantiates a new double option.- Parameters:
longForm
- the long form
-
-
Method Details
-
parseValue
protected Object parseValue(String arg, Locale locale) throws CmdLineParser.IllegalOptionValueException Description copied from class:CmdLineParser.Option
Override to extract and convert an option value passed on the command-line.- Overrides:
parseValue
in classCmdLineParser.Option
- Parameters:
arg
- the arglocale
- the locale- Returns:
- the object
- Throws:
CmdLineParser.IllegalOptionValueException
- the illegal option value exception
-