public class Main {
    
    public static void main(String[] args) throws Exception {
 
        new Main().ensureLessThan(15, 4);
        
        System.out.println("done");
    }
    
    <N extends Number & Comparable<N>, S extends N> S ensureLessThan(N threshold, S input) {
        if (input.compareTo(threshold) >= 0) {
            throw new IllegalArgumentException("Input " + input + " is not less than " + threshold);
        }
        return input;
    }
}