Class Validation


  • public class Validation
    extends Object
    • Method Detail

      • notNull

        public static <T> T notNull​(T instance,
                                    String name)
      • notEmpty

        public static <T> T[] notEmpty​(T[] array,
                                       String name)
      • noNullElements

        public static <T> T[] noNullElements​(T[] array,
                                             String name)
      • isBlank

        public static boolean isBlank​(String string)

        Checks if a given string is blank or null.

        Parameters:
        string - the String to check, may be null
        Returns:
        true if the CharSequence is null, empty or whitespace only
      • isTrue

        public static void isTrue​(boolean mustBeTrue,
                                  String format,
                                  Object... var)