class PositiveNonZeroLong implements IParameterValidator {

  @Override
  public void validate(String name, String value) throws ParameterException {
    long n = Long.parseLong(value);
    if (n <= 0) {
      throw new ParameterException("Parameter " + name + " should be greater than zero (found " + value + ")");
    }
  }

}