Package org.rwtodd.args
Class CharParam
- All Implemented Interfaces:
OneArgParam<Character>,Param
CharParam is a Param that accepts single-character arguments.
It defaults to ' ' if another default is not selected.
-
Field Summary
Fields inherited from class org.rwtodd.args.BasicOneArgParam
arg, helpText, paramNames -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CharacterconvertArg(String param, String arg) A conversion method to get a T from a string.
-
Constructor Details
-
CharParam
-
CharParam
-
-
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<Character>- 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
-