Class Assert

java.lang.Object
com.dtsx.astra.sdk.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 b, String msg)
      Check condition at start.
      Parameters:
      b - predicate should be true
      msg - error message