List of utility methods to do Assert Not Null
void | assertNotNull(final T value, final String param) This method verifies if the input argument is null or not.
if (null == value) { throw new IllegalArgumentException( ILLEGAL_ARGUMENT_EXCEPTION_MSG + ((null != param) ? param : "unknown")); |
void | assertNotNull(Object argumentThatMustNotBeNull, String argumentName) assert Not Null if (argumentThatMustNotBeNull == null) { throw new IllegalArgumentException(argumentName + " must not be null."); |
void | assertNotNull(Object expression) assert Not Null assert expression != null : TRANSFORM_WITHOUT_CHECK;
|
void | assertNotNull(Object o) assert Not Null if (o == null) { throw new AssertionError("Null."); |
void | assertNotNull(Object obj) Method assertNotNull. if (obj == null) { throw new RuntimeException("assertion: must not be null"); |
void | assertNotNull(Object obj) assert Not Null assertNotNull(obj, "[Assertion failed] - This object argument object must not be null.");
|
void | assertNotNull(Object obj, RuntimeException ex) assert Not Null if (obj == null) { throw ex; |
void | assertNotNull(Object obj, String msgTemplate, Object... params) assert Not Null if (obj == null) { throw new NullPointerException(getMsg("Assert fail: should not be null", msgTemplate, params)); |
void | assertNotNull(Object obj, String name) Checks whether the given Object is not null. if (obj == null) { throw new IllegalArgumentException("[ " + name + " ] should not be null."); |
void | assertNotNull(Object obj, String name) assert Not Null if (obj == null) { throw new IllegalArgumentException("Null " + name + " arguments are not accepted!"); |