Class ValidateUtils

    • Method Detail

      • checkNotNull

        public static <T> T checkNotNull​(T t,
                                         String message)
      • checkNotNull

        public static <T> T checkNotNull​(T t,
                                         String message,
                                         Object arg)
      • checkNotNull

        public static <T> T checkNotNull​(T t,
                                         String message,
                                         long value)
      • checkNotNull

        public static <T> T checkNotNull​(T t,
                                         String message,
                                         Object... args)
      • checkNotNullAndNotEmpty

        public static String checkNotNullAndNotEmpty​(String t,
                                                     String message)
      • checkNotNullAndNotEmpty

        public static String checkNotNullAndNotEmpty​(String t,
                                                     String message,
                                                     Object... args)
      • checkNotNullAndNotEmpty

        public static <K,​V,​M extends Map<K,​V>> M checkNotNullAndNotEmpty​(M t,
                                                                                           String message,
                                                                                           Object... args)
      • checkNotNullAndNotEmpty

        public static <T,​C extends Collection<T>> C checkNotNullAndNotEmpty​(C t,
                                                                                  String message,
                                                                                  Object... args)
      • checkNotNullAndNotEmpty

        public static <T,​C extends Iterable<T>> C checkNotNullAndNotEmpty​(C t,
                                                                                String message,
                                                                                Object... args)
      • checkNotNullAndNotEmpty

        public static byte[] checkNotNullAndNotEmpty​(byte[] a,
                                                     String message)
      • checkNotNullAndNotEmpty

        public static byte[] checkNotNullAndNotEmpty​(byte[] a,
                                                     String message,
                                                     Object... args)
      • checkNotNullAndNotEmpty

        public static char[] checkNotNullAndNotEmpty​(char[] a,
                                                     String message)
      • checkNotNullAndNotEmpty

        public static char[] checkNotNullAndNotEmpty​(char[] a,
                                                     String message,
                                                     Object... args)
      • checkNotNullAndNotEmpty

        public static int[] checkNotNullAndNotEmpty​(int[] a,
                                                    String message)
      • checkNotNullAndNotEmpty

        public static int[] checkNotNullAndNotEmpty​(int[] a,
                                                    String message,
                                                    Object... args)
      • checkNotNullAndNotEmpty

        public static <T> T[] checkNotNullAndNotEmpty​(T[] t,
                                                      String message,
                                                      Object... args)
      • checkInstanceOf

        public static <T> T checkInstanceOf​(Object v,
                                            Class<T> expected,
                                            String message,
                                            long value)
      • checkInstanceOf

        public static <T> T checkInstanceOf​(Object v,
                                            Class<T> expected,
                                            String message)
      • checkInstanceOf

        public static <T> T checkInstanceOf​(Object v,
                                            Class<T> expected,
                                            String message,
                                            Object arg)
      • checkInstanceOf

        public static <T> T checkInstanceOf​(Object v,
                                            Class<T> expected,
                                            String message,
                                            Object... args)
      • checkTrue

        public static void checkTrue​(boolean flag,
                                     String message)
      • checkTrue

        public static void checkTrue​(boolean flag,
                                     String message,
                                     long value)
      • checkTrue

        public static void checkTrue​(boolean flag,
                                     String message,
                                     Object arg)
      • checkTrue

        public static void checkTrue​(boolean flag,
                                     String message,
                                     Object... args)
      • throwIllegalArgumentException

        public static void throwIllegalArgumentException​(String format,
                                                         Object... args)
      • checkState

        public static void checkState​(boolean flag,
                                      String message)
      • checkState

        public static void checkState​(boolean flag,
                                      String message,
                                      long value)
      • checkState

        public static void checkState​(boolean flag,
                                      String message,
                                      Object arg)
      • checkState

        public static void checkState​(boolean flag,
                                      String message,
                                      Object... args)
      • throwIllegalStateException

        public static void throwIllegalStateException​(String format,
                                                      Object... args)
      • createFormattedException

        public static <T extends Throwable> T createFormattedException​(Function<? super String,​? extends T> constructor,
                                                                       String format,
                                                                       Object... args)
      • initializeExceptionCause

        public static <T extends Throwable> T initializeExceptionCause​(T err,
                                                                       Throwable cause)