Preconditions or Objects (Java 8+) instead.@Deprecated public final class Check extends Object
| Constructor and Description |
|---|
Check()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
argument(boolean expression)
Deprecated.
since 1.5. Use
Preconditions instead. |
static void |
argument(boolean expression,
Object errorMessage)
Deprecated.
since 1.5. Use
Preconditions instead. |
static <T> T |
notNull(T reference)
Deprecated.
since 1.5. Use
Preconditions instead. |
static <T> T |
notNull(T reference,
Object errorMessage)
Deprecated.
since 1.5. Use
Preconditions instead. |
@Deprecated public static <T> T notNull(T reference)
Preconditions instead.reference is not null. If it is, throw a
NullPointerException.T - reference to check is null or notreference - reference to check is null or notreference so it may be usedNullPointerException - if reference is null@Deprecated public static <T> T notNull(T reference, Object errorMessage)
Preconditions instead.reference is not null. If it is, throw a
NullPointerException.T - reference to check is null or notreference - reference to check is null or noterrorMessage - message passed to the NullPointerException constructor
to give more context when debuggingreference so it may be usedNullPointerException - if reference is null@Deprecated public static void argument(boolean expression)
Preconditions instead.expression - a boolean expressionIllegalArgumentException - if expression is false@Deprecated public static void argument(boolean expression, Object errorMessage)
Preconditions instead.expression - a boolean expressionerrorMessage - the exception message to use if the check fails; will be
converted to a string using String.valueOf(Object)IllegalArgumentException - if expression is falseCopyright © 2018 Atlassian. All rights reserved.