Class Preconditions

java.lang.Object
io.bytestreams.codec.core.util.Preconditions

public final class Preconditions extends Object
Utility methods for checking preconditions.
  • Method Details

    • check

      public static void check(boolean condition, String errorTemplate, Object... args)
      Validates that a condition is true.
      Parameters:
      condition - the condition to check
      errorTemplate - the error message template
      args - the arguments for the error message template
      Throws:
      IllegalArgumentException - if the condition is false