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
-
Method Summary
-
Constructor Details
-
PositiveInteger
public PositiveInteger()
-
-
Method Details
-
validate
Description copied from interface:IParameterValidator
Validate the parameter.- Specified by:
validate
in 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.
-