public static void precondition ( boolean assertion , String format , Object ... params ) { if ( ! assertion ) { throw new IllegalArgumentException ( String . format ( format , params ) ) ; } }
Enforces a state precondition throwing an IllegalArgumentException if the assertion fails .