Class Check


  • public final class Check
    extends Object
    • Method Detail

      • requireGreaterZero

        public static int requireGreaterZero​(int value,
                                             String name)
      • requireGreaterZero

        public static long requireGreaterZero​(long value,
                                              String name)
      • requireNonNegative

        public static int requireNonNegative​(int value,
                                             String name)
      • requireNonNegative

        public static long requireNonNegative​(long value,
                                              String name)
      • requireAtLeast

        public static <E extends Comparable<E>> E requireAtLeast​(E value,
                                                                 String name,
                                                                 E minimum)
      • requireNonEmptyAndCopy

        public static <T> T[] requireNonEmptyAndCopy​(T[] value,
                                                     String name)
        Besides checking the value, this method returns a copy of the given value to avoid later modifications of the value by the caller.
      • requireNonEmptyAndCopy

        public static String[] requireNonEmptyAndCopy​(String[] value,
                                                      String name)
        Besides checking the value, this method returns a copy of the given value to avoid later modifications of the value by the caller.