| Modifier and Type | Field and Description |
|---|---|
protected static String[] |
sFalse |
protected static String[] |
sTrue |
bundle, ILLEGAL_SN_CHARS, locale, MAX_COUNT_LIMIT, MIN_COUNT_LIMIT, values| Constructor and Description |
|---|
BooleanOption(String shortName,
String longName,
String description,
boolean allowMany)
Creates a new
BooleanOption instance. |
BooleanOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Creates a new
BooleanOption instance. |
| Modifier and Type | Method and Description |
|---|---|
Class<Boolean> |
getType()
Returns the class type of value this option can take.
|
protected Boolean |
parseValue(String arg)
Parsing of a flag option makes little sense.
|
addValue, equals, getDescription, getLongName, getMaxCount, getMinCount, getShortName, getUsageTypeString, getValues, hashCode, isAllowMany, isHidden, isMandatory, requiresValue, setHidden, setMinMaxCounts, toStringprotected static final String[] sTrue
protected static final String[] sFalse
public BooleanOption(String shortName, String longName, String description, int minCount, int maxCount)
BooleanOption instance.shortName - short name of the option (e.g. -?)longName - long name of the option (e.g. --help)description - helpful description of the option (printed for usage message)minCount - minimum number of occurrences required for this optionmaxCount - maximum number of occurrences required for this optionpublic BooleanOption(String shortName, String longName, String description, boolean allowMany)
BooleanOption instance.shortName - short name of the option (e.g. -?)longName - long name of the option (e.g. --help)description - helpful description of the option (printed for usage message)allowMany - whether this option can take more than one value (i.e. be specified more than once)protected Boolean parseValue(String arg) throws OptionException
parseValue in class Option<Boolean>arg - string argument from which a value is to be parsedOptionException - if a problem occurs while parsing the argument stringCopyright © 2017. All rights reserved.