guava/src/com/google/common/base/Preconditions.java
public static void checkState(boolean expression, @Nullable Object errorMessage) {
    if (!expression) {
      throw new IllegalStateException(String.valueOf(errorMessage));
    }
  }
public static void checkState(boolean expression, @Nullable Object errorMessage) {
    if (!expression) {
      throw new IllegalStateException(String.valueOf(errorMessage));
    }
  }
Ensures the truth of an expression involving the state of the calling instance, but not
involving any parameters to the calling method.

@param expression a boolean expression
@param errorMessage the exception message to use if the check fails; will be converted to a
string using {@link String#valueOf(Object)}
@throws IllegalStateException if {@code expression} is false
@see Verify#verify Verify.verify()