| Modifier and Type | Class and Description |
|---|---|
static class |
StringOption.FileFilter
Implementation of an
StringOption.Filter which filters based
on existence and type of file to which the string refers. |
static interface |
StringOption.Filter
Acceptance filter for
StringOption instances. |
bundle, ILLEGAL_SN_CHARS, locale, MAX_COUNT_LIMIT, MIN_COUNT_LIMIT, values| Constructor and Description |
|---|
StringOption(String shortName,
String longName,
String description,
boolean mandatory,
boolean allowMany)
Creates a new
StringOption instance. |
StringOption(String shortName,
String longName,
String description,
int minCount,
int maxCount)
Creates a new
StringOption instance. |
| Modifier and Type | Method and Description |
|---|---|
StringOption.Filter |
getFilter()
Returns the
StringOption.Filter for this instance. |
Class<String> |
getType()
Returns the class type of value this option can take.
|
protected String |
parseValue(String arg)
Parses the argument string for an option value.
|
void |
setFilter(StringOption.Filter filter)
Sets the
StringOption.Filter for this instance. |
addValue, equals, getDescription, getLongName, getMaxCount, getMinCount, getShortName, getUsageTypeString, getValues, hashCode, isAllowMany, isHidden, isMandatory, requiresValue, setHidden, setMinMaxCounts, toStringpublic StringOption(String shortName, String longName, String description, int minCount, int maxCount)
StringOption instance.shortName - short name of the option (e.g. -n)longName - long name of the option (e.g. --name)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 StringOption(String shortName, String longName, String description, boolean mandatory, boolean allowMany)
StringOption instance.shortName - short name of the option (e.g. -n)longName - long name of the option (e.g. --name)description - helpful description of the option (printed for usage message)mandatory - whether this option must be specifiedallowMany - whether this option can take more than one value (i.e. be specified more than once)protected String parseValue(String arg) throws OptionException
OptionInteger instance representing 123).parseValue in class Option<String>arg - string argument from which a value is to be parsedOptionException - if a problem occurs while parsing the argument stringpublic void setFilter(StringOption.Filter filter)
StringOption.Filter for this instance.filter - Filter instance to use for accepting/rejecting valuespublic StringOption.Filter getFilter()
StringOption.Filter for this instance.Copyright © 2015. All rights reserved.