Class Checks

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

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

    Modifier and Type
    Method
    Description
    static void
    ensure(boolean condition, String errorMessage)
    Throws a GrammarException if the given condition is not met.
    static void
    ensure(boolean condition, String errorMessageFormat, Object... errorMessageArgs)
    Throws a GrammarException if the given condition is not met.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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