code: public static void precondition(boolean assertion, String format, Object... params) {
          if (!assertion) {
              throw new IllegalArgumentException(String.format(format, params));
          }
      }
docs: Enforces a state precondition, throwing an IllegalArgumentException if
  the assertion fails.
  
  @param assertion the assertion to be enforced
  @param format the exception message format string
  @param params the exception message parameters
  @throws IllegalArgumentException if the assertion fails