code: public static void inBounds(final Integer input, final Integer min, final Integer max, final String inputName) {
          notNull(input, inputName);
  
          if ((min != null) && (input < min)) {
              throw new IndexOutOfBoundsException("a value of " + input.toString() + " was unexpected for " + maskNullArgument(inputName) + ", it is expected to be less than " + min.toString());
          }
  
          if ((max != null) && (input > max)) {
              throw new IndexOutOfBoundsException("a value of " + input.toString() + " was unexpected for " + maskNullArgument(inputName) + ", it is expected to be greater than " + max.toString());
          }
      }
docs: Checks that the input value is within the bounds of a maximum or minimum value
  @param input the input to check
  @param min the minimum value of the input (if null, input is not bound by minimum value)
  @param max the maximum value of the input (if null, input is not bound by maximum value)
  @param inputName the name of the input to report in error
  @throws IllegalArgumentException if input is null or if the input is less than min or greater than max