public static int requirePositive(int i, String message) {
    Objects.requireNonNull(message, "message must not be null");

    if (i <= 0) {
      throw new IllegalArgumentException(message);
    }

    return i;
  }
public static int requirePositive ( int i , String message ) { Objects . requireNonNull ( message , "message must not be null" ) ; if ( i <= 0 ) { throw new IllegalArgumentException ( message ) ; } return i ; }
Requires that an {@code int} is greater than zero.

@param i the {@code int} to test
@param message detail message to be used in the event that a {@link IllegalArgumentException}
is thrown
@return the {@code int} if greater than zero
@throws IllegalArgumentException if {@code i} is less than or equal to zero