Class Preconditions

java.lang.Object
de.siegmar.fastcsv.util.Preconditions

public final class Preconditions extends Object

Internal utility class.

It is not a part of the API!

  • Method Details

    • checkArgument

      public static void checkArgument(boolean expression, String errorMessage)
      Checks the given argument and throws an exception if not met.
      Parameters:
      expression - the expression that has to be true
      errorMessage - the exception message to be thrown
      Throws:
      IllegalArgumentException - if the expression is false.
    • checkArgument

      public static void checkArgument(boolean expression, Supplier<String> errorMessageSupplier)
      Checks the given argument and throws an exception if not met.
      Parameters:
      expression - the expression that has to be true
      errorMessageSupplier - a supplier for the exception message to be thrown
      Throws:
      IllegalArgumentException - if the expression is false.