public final class Preconditions
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARGUMENT_EMPTY |
| Modifier | Constructor and Description |
|---|---|
private |
Preconditions() |
| Modifier and Type | Method and Description |
|---|---|
static <T> void |
checkNotNull(FilterOperator<T> filterOperator)
Verifies that the given FilterOperator reference is not
null. |
static <T> T |
checkNotNull(T reference)
Verifies that the given object reference is not
null. |
static <T> T |
checkNotNull(T reference,
java.lang.String message)
Verifies that the given object reference is not
null. |
static java.lang.CharSequence |
checkNotNullOrEmpty(java.lang.CharSequence s)
Verifies that the given
CharSequence is not null or empty. |
static java.lang.CharSequence |
checkNotNullOrEmpty(java.lang.CharSequence s,
java.lang.String message)
Verifies that the given
CharSequence is not null or empty. |
static <T> T[] |
checkNotNullOrEmpty(T[] array)
Verifies that the given array is not
null or empty. |
private static void |
throwExceptionForBeingEmpty() |
private static void |
throwExceptionForBeingEmpty(java.lang.String message) |
public static final java.lang.String ARGUMENT_EMPTY
public static java.lang.CharSequence checkNotNullOrEmpty(java.lang.CharSequence s)
CharSequence is not null or empty.s - the given CharSequence.CharSequence.java.lang.NullPointerException - if the given CharSequence is null.java.lang.IllegalArgumentException - if the given CharSequence is empty.public static java.lang.CharSequence checkNotNullOrEmpty(java.lang.CharSequence s,
java.lang.String message)
CharSequence is not null or empty.s - the given CharSequence.message - error message in case of empty String.CharSequence.java.lang.NullPointerException - if the given CharSequence is null.java.lang.IllegalArgumentException - if the given CharSequence is empty.public static <T> T[] checkNotNullOrEmpty(T[] array)
null or empty.array - the given array.java.lang.NullPointerException - if the given array is null.java.lang.IllegalArgumentException - if the given array is empty.public static <T> T checkNotNull(T reference)
null.reference - the given object reference.null reference that was validated.java.lang.NullPointerException - if the given object reference is null.public static <T> T checkNotNull(T reference,
java.lang.String message)
null.reference - the given object reference.message - error message in case of null reference.null reference that was validated.java.lang.NullPointerException - if the given object reference is null.public static <T> void checkNotNull(FilterOperator<T> filterOperator)
null.reference - the given object reference.java.lang.NullPointerException - if the given object reference is null.private static void throwExceptionForBeingEmpty()
private static void throwExceptionForBeingEmpty(java.lang.String message)