Package org.rwtodd.args
Class DoubleParam
- All Implemented Interfaces:
OneArgParam,Param
DoubleParam is a Param that accepts double arguments.
It defaults to NaN if another default is not selected.
-
Field Summary
Fields inherited from class org.rwtodd.args.BasicOneArgParam
arg, helpText, paramNames -
Constructor Summary
ConstructorsConstructorDescriptionDoubleParam(Collection<String> names, Double dflt, String help) DoubleParam(Collection<String> names, String help) -
Method Summary
Modifier and TypeMethodDescriptionprotected DoubleconvertArg(String param, String arg) A conversion method to get a T from a string.
-
Constructor Details
-
DoubleParam
-
DoubleParam
-
-
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<Double>- 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
-