Class Assert

java.lang.Object
com.datastax.astra.internal.utils.Assert

public class Assert extends Object
Syntaxic sugar for common validations.
Author:
Cedrick LUNVEN (@clunven)
  • Method Details

    • hasLength

      public static void hasLength(String s, String name)
      Input string should not be empty.
      Parameters:
      s - string value
      name - param name
    • notNull

      public static void notNull(Object o, String name)
      Input object should not be null
      Parameters:
      o - object value
      name - param name
    • isTrue

      public static void isTrue(boolean condition, String msg)
      Check condition at start.
      Parameters:
      condition - predicate should be true
      msg - error message