Package org.rwtodd.args
Class IntParam
- All Implemented Interfaces:
OneArgParam,Param
- Direct Known Subclasses:
BoundedIntParam,ClampedIntParam
IntParam is a Param that accepts integer arguments.
-
Field Summary
Fields inherited from class org.rwtodd.args.BasicOneArgParam
arg, helpText, paramNames -
Constructor Summary
ConstructorsConstructorDescriptionIntParam(Collection<String> names, Integer dflt, String help) IntParam(Collection<String> names, String help) -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegerconvertArg(String param, String arg) A conversion method to get a T from a string.
-
Constructor Details
-
IntParam
-
IntParam
-
-
Method Details
-
convertArg
Description copied from class:BasicOneArgParamA conversion method to get a T from a string. All subclasses must define this for the type they handle.- Specified by:
convertArgin classBasicOneArgParam<Integer>- Parameters:
param- the name of the parameter found on the command line. In some cases it might affect conversion, but it is also good for error messages.arg- the argument to convert to a type T.- Returns:
- the converted argument.
- Throws:
ArgParserException
-