|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jdesktop.swingx.util.Contract
public class Contract
Utility class for checking contracts.
| Method Summary | ||
|---|---|---|
static
|
asNotNull(T input,
java.lang.String message)
Tests the input parameter against null. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 null
java.lang.NullPointerException - if input is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||