protected void integerParamCheck(final String param, final String paramName, final boolean nonNegative) {
try {
final int value = Integer.parseInt(param);
if (nonNegative && value < 0) {
throw new StepExecutionException(paramName + " parameter with value '" + param + "' must not be negative", this);
}
} catch (NumberFormatException e) {
throw new StepExecutionException("Can't parse " + paramName + " parameter with value '" + param + "' as an integer.", this);
}
}