Java Assert assertState(boolean expression)

Here you can find the source of assertState(boolean expression)

Description

assert State

License

Open Source License

Declaration

public static void assertState(boolean expression) 

Method Source Code

//package com.java2s;
// The MIT License (MIT)

public class Main {
    public static void assertState(boolean expression) {
        if (!expression) {
            throw new IllegalStateException();
        }/*from w  w w  .  j a v  a  2 s .c o m*/
    }

    public static void assertState(boolean expression, String errorMessage) {
        if (!expression) {
            throw new IllegalStateException(errorMessage);
        }
    }
}

Related

  1. assertSameObject(Object obj1, Object obj2)
  2. assertSameSize(double[][] newLogPhi, double[][] logPhi)
  3. assertSorted(final int[] values)
  4. assertSplit(final String text, final int length)
  5. assertSquare(double[]... d)
  6. assertStringMatch(String first, String second)
  7. assertStringNotEmpty(String str, String name)
  8. assertStringNotEmpty(String str, String name)
  9. assertStringNotEmpty(String string, String fieldName)