Modifier | Constructor and Description |
---|---|
private |
Contract() |
Modifier and Type | Method and Description |
---|---|
static <T> T |
asNotNull(T input,
String message)
Tests the input parameter against null.
|
private Contract()
public static <T> T asNotNull(T input, String message)
PENDING: type of exception? there are raging debates, some favour an IllegalArgument?
PENDING: the implementation uses a unchecked type cast to an array. can we do better, how?
T
- the type of the input parameterinput
- the argument to check against null.message
- the text of the exception if the argument is nullNullPointerException
- if input is nullWebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses