Package org.rwtodd.args
Class ClampedParam<T extends Comparable<T>>
java.lang.Object
org.rwtodd.args.ClampedParam<T>
- All Implemented Interfaces:
OneArgParam<T>,Param
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddHelp(PrintStream ps) adds help for this parameter to the given stream.voidAdd the parameter's names to aMap<String,Param>.getValue()gets the current value of the parametervoidProcess an parameter with its argument.
-
Constructor Details
-
ClampedParam
-
-
Method Details
-
process
Process an parameter with its argument.- Specified by:
processin interfaceOneArgParam<T extends Comparable<T>>- Parameters:
param- the name of the parameter, as it was found in the command-line.argument- the given argument to the parameter.- Throws:
ArgParserException- if there is a problem parsing the argument.
-
getValue
gets the current value of the parameter- Specified by:
getValuein interfaceOneArgParam<T extends Comparable<T>>
-
addToMap
Add the parameter's names to aMap<String,Param>. -
addHelp
adds help for this parameter to the given stream.
-