public final class Preconditions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ARGUMENT_EMPTY |
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,
String message)
Verifies that the given object reference is not
null . |
static CharSequence |
checkNotNullOrEmpty(CharSequence s)
Verifies that the given
CharSequence is not null or empty. |
static CharSequence |
checkNotNullOrEmpty(CharSequence s,
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. |
public static final String ARGUMENT_EMPTY
public static CharSequence checkNotNullOrEmpty(CharSequence s)
CharSequence
is not null
or empty.s
- the given CharSequence
.CharSequence
.NullPointerException
- if the given CharSequence
is null
.IllegalArgumentException
- if the given CharSequence
is empty.public static CharSequence checkNotNullOrEmpty(CharSequence s, String message)
CharSequence
is not null
or empty.s
- the given CharSequence
.message
- error message in case of empty String
.CharSequence
.NullPointerException
- if the given CharSequence
is null
.IllegalArgumentException
- if the given CharSequence
is empty.public static <T> T[] checkNotNullOrEmpty(T[] array)
null
or empty.array
- the given array.NullPointerException
- if the given array is null
.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.NullPointerException
- if the given object reference is null
.public static <T> T checkNotNull(T reference, String message)
null
.reference
- the given object reference.message
- error message in case of null reference.null
reference that was validated.NullPointerException
- if the given object reference is null
.public static <T> void checkNotNull(FilterOperator<T> filterOperator)
null
.reference
- the given object reference.NullPointerException
- if the given object reference is null
.Copyright © 2014–2016 AssertJ. All rights reserved.