Class RangeArgumentChoice<T extends Comparable<T>>
java.lang.Object
net.sourceforge.argparse4j.impl.choice.RangeArgumentChoice<T>
- Type Parameters:
T- The type to compare.
- All Implemented Interfaces:
ArgumentChoice
Choices from given range.
The given value will be checked if it is in range [min, max], inclusive. The
min and max are specified in constructor arguments.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRangeArgumentChoice(T min, T max) Creates object using range [min,max], inclusive. -
Method Summary
-
Field Details
-
min_
-
max_
-
-
Constructor Details
-
RangeArgumentChoice
-
-
Method Details
-
contains
Description copied from interface:ArgumentChoiceReturns
trueiffvalis valid choice according to this object's constraint.If the objects derived from
RuntimeExceptionare thrown because of invalid input from command line, subclass must catch these exceptions and returnfalse.- Specified by:
containsin interfaceArgumentChoice- Parameters:
val- The attribute value.- Returns:
trueorfalse.
-
textualFormat
Description copied from interface:ArgumentChoiceReturn textual representation of this choice.
This string will be used in help and error messages.
- Specified by:
textualFormatin interfaceArgumentChoice- Returns:
- The textual representation of this choice.
-
toString
-