Package com.beust.jcommander.validators
Class PositiveInteger
java.lang.Object
com.beust.jcommander.validators.PositiveInteger
- All Implemented Interfaces:
IParameterValidator
A validator that makes sure the value of the parameter is a positive integer.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
PositiveInteger
public PositiveInteger()
-
-
Method Details
-
validate
Description copied from interface:IParameterValidatorValidate the parameter.- Specified by:
validatein interfaceIParameterValidator- Parameters:
name- The name of the parameter (e.g. "-host").value- The value of the parameter that we need to validate- Throws:
ParameterException- Thrown if the value of the parameter is invalid.
-