public final class Checks extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
notNull(T value)
Checks that the given value is not
null. |
static <T> T |
notNull(T value,
String message)
Checks that the given value is not
null, using the given message
as the exception message if an exception is thrown. |
public static <T> T notNull(T value)
null.value - object reference to checknullNullPointerException - if value is nullpublic static <T> T notNull(T value,
String message)
null, using the given message
as the exception message if an exception is thrown.value - object reference to checkmessage - message to use if value is nullnullNullPointerException - if value is nullCopyright © 2002–2025 JUnit. All rights reserved.