snaq.util.jclap
Class EnumeratedIntegerOption
java.lang.Object
snaq.util.jclap.Option<E>
snaq.util.jclap.EnumeratedOption<java.lang.Integer>
snaq.util.jclap.EnumeratedIntegerOption
public final class EnumeratedIntegerOption
- extends EnumeratedOption<java.lang.Integer>
Implementation of an Option
with value restricted to a
specified enumeration of type Integer
.
- Author:
- Giles Winstanley
Constructor Summary |
EnumeratedIntegerOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
boolean mandatory,
boolean allowMany,
java.util.Collection<java.lang.Integer> allowedValues)
Creates a new EnumeratedIntegerOption instance. |
EnumeratedIntegerOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
int minCount,
int maxCount,
java.util.Collection<java.lang.Integer> allowedValues)
Creates a new EnumeratedIntegerOption instance. |
Method Summary |
java.lang.Class<java.lang.Integer> |
getType()
Returns the class type of value this option can take. |
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 |
EnumeratedIntegerOption
public EnumeratedIntegerOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
int minCount,
int maxCount,
java.util.Collection<java.lang.Integer> allowedValues)
- Creates a new
EnumeratedIntegerOption
instance.
- Parameters:
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 take
EnumeratedIntegerOption
public EnumeratedIntegerOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
boolean mandatory,
boolean allowMany,
java.util.Collection<java.lang.Integer> allowedValues)
- Creates a new
EnumeratedIntegerOption
instance.
- Parameters:
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 take
getType
public java.lang.Class<java.lang.Integer> getType()
- Description copied from class:
Option
- Returns the class type of value this option can take.
- Specified by:
getType
in class Option<java.lang.Integer>