Package com.exedio.cope.util
Class Check
- java.lang.Object
-
- com.exedio.cope.util.Check
-
public final class Check extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <E extends Comparable<E>>
ErequireAtLeast(E value, String name, E minimum)
static double
requireGreaterZero(double value, String name)
static int
requireGreaterZero(int value, String name)
static long
requireGreaterZero(long value, String name)
static String
requireNonEmpty(String value, String name)
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.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.static double
requireNonNegative(double value, String name)
static int
requireNonNegative(int value, String name)
static long
requireNonNegative(long value, String name)
-
-
-
Method Detail
-
requireGreaterZero
public static int requireGreaterZero(int value, String name)
-
requireGreaterZero
public static long requireGreaterZero(long value, String name)
-
requireGreaterZero
public static double requireGreaterZero(double value, String name)
-
requireNonNegative
public static int requireNonNegative(int value, String name)
-
requireNonNegative
public static long requireNonNegative(long value, String name)
-
requireNonNegative
public static double requireNonNegative(double 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.
-
-