class ValidateIntegerInRange implements Function<Integer, Integer> {

    private final int minimum;
    private final int maximum;
    private final Supplier<? extends RuntimeException> supplier;

    /**
     * Constructor
     *
     * @param minimum minimum
     * @param maximum maximum
     * @param supplier supplier
     */
    public ValidateIntegerInRange(
            int minimum, int maximum, Supplier<? extends RuntimeException> supplier) {
        Precondition.notNull(supplier);
        this.minimum = minimum;
        this.maximum = maximum;
        this.supplier = supplier;
    }

    /**
     * Method to apply a function
     *
     * @param value value
     * @return the return value
     */
    @Override
    public Integer apply(Integer value) {<FILL_FUNCTION_BODY>}
}

        if (value < minimum || value > maximum) {
            throw supplier.get();
        }

        return value;
    
<no_super_class>