public static int requireInRange(int val, int first, int lastExclusive) {
        if (val < first || val >= lastExclusive) {
            throw new IllegalArgumentException(val + IS_NOT_IN_THE_RANGE + first + ", " + lastExclusive + ")");
        }
        return val;
    }
Returns the given value if it is positive.

@param val to check
@return the given value
@throws IllegalArgumentException if the given value is not positive
common-parent/invariant/src/main/java/com/speedment/common/invariant/IntRangeUtil.java