public static void ensure(boolean condition, String errorMessageFormat, Object... errorMessageArgs) {
        if (!condition) {
            throw new GrammarException(errorMessageFormat, errorMessageArgs);
        }
    }
public static void ensure ( boolean condition , String errorMessageFormat , Object ... errorMessageArgs ) { if ( ! condition ) { throw new GrammarException ( errorMessageFormat , errorMessageArgs ) ; } }
Throws a GrammarException if the given condition is not met.

@param condition          the condition
@param errorMessageFormat the error message format
@param errorMessageArgs   the error message arguments