public final class Check
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
requireNonEmpty(java.lang.String obj,
java.lang.String message)
Checks if the given
obj is not null and it is not empty. |
static <T> T |
requireNonNull(T obj)
Checks whether the given
obj is null. |
static <T> T |
requireNonNull(T obj,
java.lang.String message)
Checks whether the given
obj is null. |
public static <T> T requireNonNull(T obj)
obj is null. If it is null it will throw an
IllegalArgumentException.T - the type of the object.obj - the object which should be checked.null.public static <T> T requireNonNull(T obj,
java.lang.String message)
obj is null. If it is null it will throw an
IllegalArgumentException.T - the type of the object.obj - the object which should be checked.message - the message which is thrown when the obj is null.null.public static java.lang.String requireNonEmpty(java.lang.String obj,
java.lang.String message)
obj is not null and it is not empty.obj - the object which should be checked.message - the message which is thrown when it is empty.null and not empty.