public final class Assert
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
Assert() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
isEmpty(java.lang.Object o)
Checks if an object has empty semantics.
|
static boolean |
isNonEmpty(java.lang.Object o)
Opposite of
isEmpty(Object). |
static <T> T |
requireNonEmpty(T value)
Checks a value for emptiness and throws an IllegalArgumentException if it's empty.
|
static <T> T |
requireNonEmpty(T value,
java.lang.String message)
Checks a value for emptiness and throws an IllegalArgumentException if it's empty.
|
static int |
valueIsAtLeast(int value,
int minValue) |
public static boolean isEmpty(java.lang.Object o)
nullCharSequenceIterableMapo - value to check for emptinesspublic static boolean isNonEmpty(java.lang.Object o)
isEmpty(Object).o - value to check for non-emptinesspublic static <T> T requireNonEmpty(T value)
T - type of valuevalue - value to check for emptinesspublic static <T> T requireNonEmpty(T value,
java.lang.String message)
T - type of valuevalue - value to check for emptinessmessage - message to provide in exceptionpublic static int valueIsAtLeast(int value,
int minValue)