Package org.rwtodd.args
Class EnumParam<T extends Enum<T>>
java.lang.Object
org.rwtodd.args.EnumParam<T>
- All Implemented Interfaces:
NoArgParam,Param
A parameter which gives options based on enum values.
The right way to instantiate it is like this:
new EnumParam<>(MyEnum.class, "help string").-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
EnumParam
-
EnumParam
Create the EnumParam without a default (it will be null)
-
-
Method Details
-
addToMap
Add the parameter's names to aMap<String,Param>. -
addHelp
adds help for this parameter to the given stream. -
process
Description copied from interface:NoArgParamProcess a parameter found on the command-line.- Specified by:
processin interfaceNoArgParam- Parameters:
param- the name of the parameter.- Throws:
ArgParserException- when there is a problem processing the parameter.
-
getValue
-