Modifier and Type | Field and Description |
---|---|
private static final double | |
private static final float | |
private static final int | |
private static final long |
Access | Constructor and Description |
---|---|
private |
Modifier and Type | Method and Description |
---|---|
public static int | |
public static long | |
public static <T> T[] | |
public static byte[] | |
public static char[] | |
public static <T extends Collection | |
public static String | checkNonEmpty(final String value, final String name)
Checks that the given argument is neither null nor empty. |
public static <K, V, T extends Map | |
public static CharSequence | checkNonEmpty(final CharSequence value, final String name)
Checks that the given argument is neither null nor empty. |
public static String | Returns: the trimmed (not the original) value.to trim and check. value, final String of the parameter. name)Trims the given argument and checks whether it is neither null nor empty. |
public static <T> T | |
public static < type of the given argument value. T> T | Returns: the given argument value.to check. value, int of the array, belongs to the exception message. index, String of the parameter, belongs to the exception message. name)Checks that the given argument is not null. |
public static <T> T | |
public static int | |
public static long | |
public static double | checkPositive(final double d, final String name)
Checks that the given argument is strictly positive. |
public static float | |
public static int | |
public static long | |
public static double | checkPositiveOrZero(final double d, final String name)
Checks that the given argument is positive or zero. |
public static float | checkPositiveOrZero(final float f, final String name)
Checks that the given argument is positive or zero. |
public static <T> T[] | deepCheckNotNull(String text, T... varargs)
Check that the given varargs is not null and does not contain elements null elements. |
public static int | |
public static long |
DOUBLE_ZERO | back to summary |
---|---|
private static final double DOUBLE_ZERO |
FLOAT_ZERO | back to summary |
---|---|
private static final float FLOAT_ZERO |
INT_ZERO | back to summary |
---|---|
private static final int INT_ZERO |
LONG_ZERO | back to summary |
---|---|
private static final long LONG_ZERO |
ObjectUtil | back to summary |
---|---|
private ObjectUtil() |
checkInRange | back to summary |
---|---|
public static int checkInRange(int i, int start, int end, String name) Checks that the given argument is in range. If it is not, throws |
checkInRange | back to summary |
---|---|
public static long checkInRange(long l, long start, long end, String name) Checks that the given argument is in range. If it is not, throws |
checkNonEmpty | back to summary |
---|---|
public static <T> T[] checkNonEmpty(T[] array, String name) Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmpty | back to summary |
---|---|
public static byte[] checkNonEmpty(byte[] array, String name) Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmpty | back to summary |
---|---|
public static char[] checkNonEmpty(char[] array, String name) Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmpty | back to summary |
---|---|
public static <T extends Collection Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmpty | back to summary |
---|---|
public static String checkNonEmpty(final String value, final String name) Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmpty | back to summary |
---|---|
public static <K, V, T extends Map Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmpty | back to summary |
---|---|
public static CharSequence checkNonEmpty(final CharSequence value, final String name) Checks that the given argument is neither null nor empty.
If it is, throws |
checkNonEmptyAfterTrim | back to summary |
---|---|
public static String checkNonEmptyAfterTrim(final String value, final String name) Trims the given argument and checks whether it is neither null nor empty.
If it is, throws
|
checkNotNull | back to summary |
---|---|
public static <T> T checkNotNull(T arg, String text) Checks that the given argument is not null. If it is, throws |
checkNotNullArrayParam | back to summary |
---|---|
public static <T> T checkNotNullArrayParam(T value, int index, String name) throws IllegalArgumentException Checks that the given argument is not null. If it is, throws
|
checkNotNullWithIAE | back to summary |
---|---|
public static <T> T checkNotNullWithIAE(final T arg, final String paramName) throws IllegalArgumentException Checks that the given argument is not null. If it is, throws |
checkPositive | back to summary |
---|---|
public static int checkPositive(int i, String name) Checks that the given argument is strictly positive. If it is not, throws |
checkPositive | back to summary |
---|---|
public static long checkPositive(long l, String name) Checks that the given argument is strictly positive. If it is not, throws |
checkPositive | back to summary |
---|---|
public static double checkPositive(final double d, final String name) Checks that the given argument is strictly positive. If it is not, throws |
checkPositive | back to summary |
---|---|
public static float checkPositive(final float f, final String name) Checks that the given argument is strictly positive. If it is not, throws |
checkPositiveOrZero | back to summary |
---|---|
public static int checkPositiveOrZero(int i, String name) Checks that the given argument is positive or zero. If it is not , throws |
checkPositiveOrZero | back to summary |
---|---|
public static long checkPositiveOrZero(long l, String name) Checks that the given argument is positive or zero. If it is not, throws |
checkPositiveOrZero | back to summary |
---|---|
public static double checkPositiveOrZero(final double d, final String name) Checks that the given argument is positive or zero. If it is not, throws |
checkPositiveOrZero | back to summary |
---|---|
public static float checkPositiveOrZero(final float f, final String name) Checks that the given argument is positive or zero. If it is not, throws |
deepCheckNotNull | back to summary |
---|---|
public static <T> T[] deepCheckNotNull(String text, T... varargs) Check that the given varargs is not null and does not contain elements
null elements.
If it is, throws |
intValue | back to summary |
---|---|
public static int intValue(Integer wrapper, int defaultValue) Resolves a possibly null Integer to a primitive int, using a default value.
|
longValue | back to summary |
---|---|
public static long longValue(Long wrapper, long defaultValue) Resolves a possibly null Long to a primitive long, using a default value.
|