|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnaq.util.jclap.Option<java.lang.String>
snaq.util.jclap.StringOption
public class StringOption
Implementation of an Option
with value of type String
.
Nested Class Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
StringOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
boolean mandatory,
boolean allowMany)
Creates a new StringOption instance. |
|
StringOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
int minCount,
int maxCount)
Creates a new StringOption instance. |
Method Summary | |
---|---|
StringOption.Filter |
getFilter()
Returns the StringOption.Filter for this instance. |
java.lang.Class<java.lang.String> |
getType()
Returns the class type of value this option can take. |
void |
setFilter(StringOption.Filter filter)
Sets the StringOption.Filter for this instance. |
Methods inherited from class snaq.util.jclap.Option |
---|
equals, getDescription, getLongName, getMaxCount, getMinCount, getShortName, getValues, hashCode, isAllowMany, isHidden, isMandatory, requiresValue, setHidden, setMinMaxCounts, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public StringOption(java.lang.String shortName, java.lang.String longName, java.lang.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(java.lang.String shortName, java.lang.String longName, java.lang.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)Method Detail |
---|
public 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.
public java.lang.Class<java.lang.String> getType()
Option
getType
in class Option<java.lang.String>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |