public static void checkState ( boolean condition , String message , Object ... args ) throws IllegalStateException { if ( ! condition ) { throw new IllegalStateException ( String . format ( message , args ) ) ; } }
Checks a certain state .