Class Checks


  • public final class Checks
    extends java.lang.Object
    Utility methods for grammar integrity checks.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void ensure​(boolean condition, java.lang.String errorMessage)
      Throws a GrammarException if the given condition is not met.
      static void ensure​(boolean condition, java.lang.String errorMessageFormat, java.lang.Object... errorMessageArgs)
      Throws a GrammarException if the given condition is not met.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • ensure

        public static void ensure​(boolean condition,
                                  java.lang.String errorMessageFormat,
                                  java.lang.Object... errorMessageArgs)
        Throws a GrammarException if the given condition is not met.
        Parameters:
        condition - the condition
        errorMessageFormat - the error message format
        errorMessageArgs - the error message arguments
      • ensure

        public static void ensure​(boolean condition,
                                  java.lang.String errorMessage)
        Throws a GrammarException if the given condition is not met.
        Parameters:
        condition - the condition
        errorMessage - the error message