Package jargs.gnu
Class CmdLineParser.Option
- java.lang.Object
-
- jargs.gnu.CmdLineParser.Option
-
- Direct Known Subclasses:
CmdLineParser.Option.BooleanOption,CmdLineParser.Option.DoubleOption,CmdLineParser.Option.IntegerOption,CmdLineParser.Option.LongOption,CmdLineParser.Option.StringOption,CustomOptionTest.ShortDateOption,CustomOptionTestCase.ShortDateOption
- Enclosing class:
- CmdLineParser
public abstract static class CmdLineParser.Option extends Object
Representation of a command-line option
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCmdLineParser.Option.BooleanOptionstatic classCmdLineParser.Option.DoubleOptionAn option that expects a floating-point valuestatic classCmdLineParser.Option.IntegerOptionAn option that expects an integer valuestatic classCmdLineParser.Option.LongOptionAn option that expects a long integer valuestatic classCmdLineParser.Option.StringOptionAn option that expects a string value
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectgetValue(String arg, Locale locale)StringlongForm()protected ObjectparseValue(String arg, Locale locale)Override to extract and convert an option value passed on the command-lineStringshortForm()booleanwantsValue()Tells whether or not this option wants a value
-
-
-
Method Detail
-
shortForm
public String shortForm()
-
longForm
public String longForm()
-
wantsValue
public boolean wantsValue()
Tells whether or not this option wants a value
-
getValue
public final Object getValue(String arg, Locale locale) throws CmdLineParser.IllegalOptionValueException
-
parseValue
protected Object parseValue(String arg, Locale locale) throws CmdLineParser.IllegalOptionValueException
Override to extract and convert an option value passed on the command-line
-
-