snaq.util.jclap
Class BooleanOption
java.lang.Object
snaq.util.jclap.Option<java.lang.Boolean>
snaq.util.jclap.BooleanOption
public final class BooleanOption
- extends Option<java.lang.Boolean>
Implementation of an Option
with value of type Boolean
(otherwise known as a "flag").
- Author:
- Giles Winstanley
Constructor Summary |
BooleanOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
boolean allowMany)
Creates a new BooleanOption instance. |
BooleanOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
int minCount,
int maxCount)
Creates a new BooleanOption instance. |
Method Summary |
java.lang.Class<java.lang.Boolean> |
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, toString |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
BooleanOption
public BooleanOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
int minCount,
int maxCount)
- Creates a new
BooleanOption
instance.
- Parameters:
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 option
BooleanOption
public BooleanOption(java.lang.String shortName,
java.lang.String longName,
java.lang.String description,
boolean allowMany)
- Creates a new
BooleanOption
instance.
- Parameters:
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)
getType
public java.lang.Class<java.lang.Boolean> getType()
- Description copied from class:
Option
- Returns the class type of value this option can take.
- Specified by:
getType
in class Option<java.lang.Boolean>