PositiveInteger (jcommander 1.85 API)

com.beust.jcommander.validators

## Class PositiveInteger

- java.lang.Object
- - com.beust.jcommander.validators.PositiveInteger

- All Implemented Interfaces:
    IParameterValidator

      public class PositiveInteger
      extends java.lang.Object
      implements IParameterValidator

  A validator that makes sure the value of the parameter is a positive integer.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PositiveInteger()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `validate(java.lang.String name, java.lang.String value)` Validate the parameter.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PositiveInteger

          public PositiveInteger()

  - ### Method Detail

    - #### validate

          public void validate(java.lang.String name,
                               java.lang.String value)
                        throws ParameterException

      Description copied from interface: `IParameterValidator`
      Validate the parameter.
      Specified by:
        `validate` in interface `IParameterValidator`
      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.