Package org.junit.internal
Class Checks
java.lang.Object
org.junit.internal.Checks
- Since:
- 4.13
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Checks
private Checks()
-
-
Method Details
-
notNull
public static <T> T notNull(T value) Checks that the given value is notnull.- Parameters:
value- object reference to check- Returns:
- the passed-in value, if not
null - Throws:
NullPointerException- ifvalueisnull
-
notNull
Checks that the given value is notnull, using the given message as the exception message if an exception is thrown.- Parameters:
value- object reference to checkmessage- message to use ifvalueisnull- Returns:
- the passed-in value, if not
null - Throws:
NullPointerException- ifvalueisnull
-