|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsnaq.util.jclap.Option<E>
snaq.util.jclap.EnumeratedOption<java.lang.String>
snaq.util.jclap.EnumeratedStringOption
public final class EnumeratedStringOption
Implementation of an Option
with value restricted to a
specified enumeration of type String
.
Constructor Summary | |
---|---|
EnumeratedStringOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
boolean mandatory,
boolean allowMany,
java.util.Collection<java.lang.String> allowedValues,
boolean ignoreCase)
Creates a new EnumeratedStringOption instance. |
|
EnumeratedStringOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
int minCount,
int maxCount,
java.util.Collection<java.lang.String> allowedValues,
boolean ignoreCase)
Creates a new EnumeratedStringOption instance. |
Method Summary | |
---|---|
java.lang.String |
getAllowedValuesString()
Returns the default version of the string denoting the values that can be assigned to this option () |
java.lang.Class<java.lang.String> |
getType()
Returns the class type of value this option can take. |
Methods inherited from class snaq.util.jclap.EnumeratedOption |
---|
getAllowedValues, getAllowedValuesString, getAllowedValuesString, isValueValid, toString |
Methods inherited from class snaq.util.jclap.Option |
---|
equals, getDescription, getLongName, getMaxCount, getMinCount, getShortName, getValues, hashCode, isAllowMany, isHidden, isMandatory, requiresValue, setHidden, setMinMaxCounts |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public EnumeratedStringOption(java.lang.String shortName, java.lang.String longName, java.lang.String description, int minCount, int maxCount, java.util.Collection<java.lang.String> allowedValues, boolean ignoreCase)
EnumeratedStringOption
instance.
shortName
- short name of the option (e.g. -t)longName
- long name of the option (e.g. --type)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 optionallowedValues
- collection of possible values this option can takeignoreCase
- whether to ignore the case in string evaluationspublic EnumeratedStringOption(java.lang.String shortName, java.lang.String longName, java.lang.String description, boolean mandatory, boolean allowMany, java.util.Collection<java.lang.String> allowedValues, boolean ignoreCase)
EnumeratedStringOption
instance.
shortName
- short name of the option (e.g. -t)longName
- long name of the option (e.g. --type)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)allowedValues
- collection of possible values this option can takeignoreCase
- whether to ignore the case in string evaluationsMethod Detail |
---|
public java.lang.Class<java.lang.String> getType()
Option
getType
in class Option<java.lang.String>
public java.lang.String getAllowedValuesString()
getAllowedValuesString
in class EnumeratedOption<java.lang.String>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |