Package jargs.gnu
Class CmdLineParser.Option.StringOption
- java.lang.Object
-
- jargs.gnu.CmdLineParser.Option
-
- jargs.gnu.CmdLineParser.Option.StringOption
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- CmdLineParser.Option
public static class CmdLineParser.Option.StringOption extends CmdLineParser.Option
An option that expects a string value.- See Also:
- Serialized Form
-
-
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
Constructors Constructor Description StringOption(char shortForm, String longForm)Instantiates a new string option.StringOption(String longForm)Instantiates a new string option.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ObjectparseValue(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 Detail
-
StringOption
public StringOption(char shortForm, String longForm)Instantiates a new string option.- Parameters:
shortForm- the short formlongForm- the long form
-
StringOption
public StringOption(String longForm)
Instantiates a new string option.- Parameters:
longForm- the long form
-
-
Method Detail
-
parseValue
protected Object parseValue(String arg, Locale locale)
Description copied from class:CmdLineParser.OptionOverride to extract and convert an option value passed on the command-line.- Overrides:
parseValuein classCmdLineParser.Option- Parameters:
arg- the arglocale- the locale- Returns:
- the object
-
-