code: public static void require(boolean assertion, String errMsgFormat, Object... args)
                      throws IllegalArgumentException {
          if (!assertion) {
              throw new IllegalArgumentException(String.format(errMsgFormat, args));
          }
      }
docs: Assert that the given expression and throw an IllegalArgumentException if it is
  false. This check is performed even if -enableassertions is not in effect. This
  method allows the IllegalArgumentException text to be formatted using a
  String.format() format string and a variable argument list.
  
  @param  assertion                Boolean expression that must be true.
  @param  errMsgFormat             Format string used to compose the error message.
  Must follow the conventions of String.format()
  (e.g., "Error on '%s': occurred: %d).
  @param  args                     Variable argument list passed to String.format().
  @throws IllegalArgumentException If the expression is false.
  @see    #require(boolean, String)