Class PositiveIntegerValidator

java.lang.Object
com.github.joschi.jadconfig.validators.PositiveIntegerValidator
All Implemented Interfaces:
Validator<Integer>

public class PositiveIntegerValidator extends Object implements Validator<Integer>
Validator class which checks if the named parameter is a positive integer.
Author:
jschalanda
  • Constructor Details

    • PositiveIntegerValidator

      public PositiveIntegerValidator()
  • Method Details

    • validate

      public void validate(String name, Integer value) throws ValidationException
      Validates if the value value the of provided configuration parameter name is a positive integer
      Specified by:
      validate in interface Validator<Integer>
      Parameters:
      name - The name of the configuration parameter
      value - The value of the configuration validator
      Throws:
      ValidationException - If the value value configuration parameter name can't be parsed as an int or is negative.