Top Description Constructors Methods
com.beust.jcommander.validators

public Class PositiveInteger

extends Object
implements IParameterValidator
Class Inheritance
All Implemented Interfaces
com.beust.jcommander.IParameterValidator
Imports
com.beust.jcommander.IParameterValidator, .ParameterException

A validator that makes sure the value of the parameter is a positive integer.
Author
Cedric Beust <[email protected]>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
validate(String
The name of the parameter (e.g. "-host").
name
,
String
The value of the parameter that we need to validate
value
)

Implements com.beust.jcommander.IParameterValidator.validate.

Validate the parameter.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PositiveIntegerback to summary
public PositiveInteger()

Method Detail

validateback to summary
public void validate(String name, String value) throws ParameterException

Implements com.beust.jcommander.IParameterValidator.validate.

Doc from com.beust.jcommander.IParameterValidator.validate.

Validate the parameter.

Parameters
name:String

The name of the parameter (e.g. "-host").

value:String

The value of the parameter that we need to validate

Exceptions
ParameterException:
Thrown if the value of the parameter is invalid.