code: public String format() {
          String result = message;
          for (Object object : objects) {
              String s = result.replaceFirst("%%", Matcher.quoteReplacement(stringify(object)));
              if (result.equals(s)) {
                  throw new IllegalStateException("Too many parameters");
              }
              result = s;
          }
          if (result.contains("%%")) {
              throw new IllegalStateException("Not enough parameters");
          }
          return result;
      }
docs: Formats the message with the given objects.
  
  @return The message, with the given objects's string representations
  inserted into it.
  @throws IllegalStateException if the number of %%'s in the message does
  not match the number of objects.