org.jdesktop.swingx.util
public class Contract extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static <T> T |
asNotNull(T input,
java.lang.String message)
Tests the input parameter against null.
|
public static <T> T asNotNull(T input, java.lang.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 nulljava.lang.NullPointerException
- if input is null