Class PositiveLongValidator

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

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

    • PositiveLongValidator

      public PositiveLongValidator()
  • Method Details

    • validate

      public void validate(String name, Long value) throws ValidationException
      Validates if the value value the of provided configuration parameter name is a positive long
      Specified by:
      validate in interface Validator<Long>
      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 long or is negative.