public static <E extends RuntimeException> int requireNotEquals(int val, int otherVal, Function<String, E> exceptionConstructor) {
        if (val == otherVal) {
            throw exceptionConstructor.apply(val + IS_EQUAL_TO + otherVal);
        }
        return val;
    }
Returns the given value if it is positive.

@param <E> RuntimeException type
@param val to check
@param exceptionConstructor to use when throwing exception
@return the given value
@throws RuntimeException if the given value is not positive
common-parent/invariant/src/main/java/com/speedment/common/invariant/IntRangeUtil.java