Package org.rwtodd.args
Class BoundedParam<T extends Comparable<T>>
java.lang.Object
org.rwtodd.args.BoundedParam<T>
- All Implemented Interfaces:
OneArgParam<T>,Param
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionBoundedParam(OneArgParam<T> delegate, T min, T max) BoundedParam(OneArgParam<T> delegate, T min, T max, BoundedParam.BoundType bt) -
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
-
BoundedParam
-
BoundedParam
-
-
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.
-