Class Preconditions

java.lang.Object
org.neo4j.driver.internal.util.Preconditions

public final class Preconditions extends Object
  • Method Details

    • checkArgument

      public static void checkArgument(boolean expression, String message)
      Assert that given expression is true.
      Parameters:
      expression - the value to check.
      message - the message.
      Throws:
      IllegalArgumentException - if given value is false.
    • checkArgument

      public static void checkArgument(Object argument, Class<?> expectedClass)
      Assert that given argument is of expected type.
      Parameters:
      argument - the object to check.
      expectedClass - the expected type.
      Throws:
      IllegalArgumentException - if argument is not of expected type.