| Package | Description |
|---|---|
| snaq.util.jclap |
Library for parsing command-line arguments in Java applications.
|
| snaq.util.jclap.example |
Example application for demonstrating use of JCLAP library.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
Option.addValue(E value)
Adds the specified value to the list of those parsed.
|
Boolean |
CLAParser.getBooleanOptionValue(String optionName)
Convenience method to return the parsed value of the named option,
or
false if the option was not set. |
Boolean |
CLAParser.getBooleanOptionValue(String optionName,
Boolean def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
List<Boolean> |
CLAParser.getBooleanOptionValues(String optionName)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
Double |
CLAParser.getDoubleOptionValue(String optionName)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
Double |
CLAParser.getDoubleOptionValue(String optionName,
Double def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
List<Double> |
CLAParser.getDoubleOptionValues(String optionName)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
Float |
CLAParser.getFloatOptionValue(String optionName)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
Float |
CLAParser.getFloatOptionValue(String optionName,
Float def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
List<Float> |
CLAParser.getFloatOptionValues(String optionName)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
Integer |
CLAParser.getIntegerOptionValue(String optionName)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
Integer |
CLAParser.getIntegerOptionValue(String optionName,
Integer def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
List<Integer> |
CLAParser.getIntegerOptionValues(String optionName)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
Long |
CLAParser.getLongOptionValue(String optionName)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
Long |
CLAParser.getLongOptionValue(String optionName,
Long def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
List<Long> |
CLAParser.getLongOptionValues(String optionName)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
<T> Option<T> |
CLAParser.getOption(String optionName,
Class<T> type)
Returns the
Option with the specified name (either short or long). |
List<Option> |
CLAParser.getOptions()
Returns all the
Option instances registered with the parser. |
<T> T |
CLAParser.getOptionValue(Option<T> opt)
Convenience method to return the parsed value of the specified option,
or null if the option was not set.
|
<T> T |
CLAParser.getOptionValue(Option<T> opt,
T def)
Convenience method to return the parsed value of the specified option,
or the specified default value if the option was not set.
|
<T> T |
CLAParser.getOptionValue(String optionName,
Class<T> type)
Convenience method to return the parsed value of the named option,
or null if the option was not set,
equivalent to
getOptionValue(optionName, type, null). |
<T> T |
CLAParser.getOptionValue(String optionName,
Class<T> type,
T def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
<T> List<T> |
CLAParser.getOptionValues(Option<T> opt)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
<T> List<T> |
CLAParser.getOptionValues(String optionName,
Class<T> type)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
String |
CLAParser.getStringOptionValue(String optionName)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
String |
CLAParser.getStringOptionValue(String optionName,
String def)
Convenience method to return the parsed value of the named option,
or the specified default value if the option was not set.
|
List<String> |
CLAParser.getStringOptionValues(String optionName)
Returns a list of all the parsed values for the specified option,
or an empty list if the option was not set.
|
static void |
DateOption.main(String[] args) |
void |
CLAParser.parse(String[] args)
Extract the option-mapped and unmapped arguments from the given array of
command-line arguments, using the specified locale.
|
void |
CLAParser.parseOrig(String[] args)
Extract the option-mapped and unmapped arguments from the given array of
command-line arguments, using the specified locale.
|
protected String |
StringOption.parseValue(String arg) |
protected abstract E |
Option.parseValue(String arg)
Parses the argument string for an option value.
|
protected Long |
LongOption.parseValue(String arg)
Parses the argument string for an option value.
|
protected Integer |
IntegerOption.parseValue(String arg)
Parses the argument string for an option value.
|
protected Float |
FloatOption.parseValue(String arg)
Parses the argument string for an option value.
|
protected String |
EnumeratedStringOption.parseValue(String arg)
Parses the argument string for an option value.
|
protected Integer |
EnumeratedIntegerOption.parseValue(String arg)
Parses the argument string for an option value.
|
protected Double |
DoubleOption.parseValue(String arg)
Parses the argument string for an option value.
|
protected Date |
DateOption.parseValue(String arg) |
protected Boolean |
BooleanOption.parseValue(String arg)
Parsing of a flag option makes little sense.
|
void |
CLAParser.setHidden(String optionName)
Hides the specified
Option from being printed in the usage message. |
| Modifier and Type | Method and Description |
|---|---|
static void |
ParserExample.main(String[] args) |
Copyright © 2015. All rights reserved.