static void checkState ( boolean check , String msg , Object ... args ) { if ( ! check ) { throw new IllegalStateException ( String . format ( msg , args ) ) ; } }
Throws IllegalStateException with the given message if the check is false .