code: public static void state(boolean state, String message, Object... format) {
          if (!state) {
              throw new IllegalStateException(String.format(message, format));
          }
      }
docs: Asserts that the given condition holds <code>true</code>.
  
  @param state The condition to check.
  @param message String for the exception message.
  @param format Formatting parameters for the exception message.
  @throws IllegalStateException If {@code condition} is <code>false</code>.