Class Checks

java.lang.Object
org.parboiled.support.Checks

public final class Checks extends Object
Utility methods for grammar integrity checks.
  • Method Details

    • ensure

      public static void ensure(boolean condition, String errorMessageFormat, 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, String errorMessage)
      Throws a GrammarException if the given condition is not met.
      Parameters:
      condition - the condition
      errorMessage - the error message