public class Assert extends Object
| Constructor and Description |
|---|
Assert() |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
notNull(T reference)
Check that
reference is not null. |
static <T> T |
notNull(T reference,
Object errorMessage)
Check that
reference is not null. |
public static <T> T notNull(T reference)
reference is not null. If it is, throw a
IllegalArgumentException.reference - reference to check is null or notreference so it may be usedIllegalArgumentException - if reference is nullpublic static <T> T notNull(T reference,
Object errorMessage)
reference is not null. If it is, throw a
IllegalArgumentException.reference - reference to check is null or noterrorMessage - message passed to the IllegalArgumentException constructor
to give more context when debuggingreference so it may be usedIllegalArgumentException - if reference is nullCopyright © 2018 Atlassian. All rights reserved.