public class Contract extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
asNotNull(T input,
String message)
Tests the input parameter against null.
|
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 nullCopyright © 2017. All Rights Reserved.