List of utility methods to do Assert Not Null
void | assertNotNull(Object object) assert Not Null assertNotNull(null, object); |
void | assertNotNull(Object object, RuntimeException cause) assert Not Null if (object == null) { cause.initCause(cause.getCause()); throw cause; |
void | assertNotNull(Object object, String description) Throws an NPE if the given object is null that uses the specified text to describe the object. if (object == null) { throw new NullPointerException("The " + description + " must not be null."); |
void | assertNotNull(Object object, String message) assert Not Null if (isNull(object)) { throw new IllegalArgumentException(message); |
void | assertNotNull(Object object, String message) assert Not Null if (object == null)
error(message);
|
void | assertNotNull(Object object, String message) assert Not Null if (object == null) { throw new NullPointerException(message); |
void | assertNotNull(Object object, String param) Asserts that the given object with name param is not null, throws IllegalArgumentException otherwise. if (object == null) { throw new IllegalArgumentException(String.format("%s may not be null.", param)); |
void | assertNotNull(Object val) assert Not Null if (val == null) { throw new AssertionError("val is null"); |
void | assertNotNull(Object value) assert Not Null assert value != null : "Expression must be checked before applying transformation"; |
void | assertNotNull(Object... objects) Throw an IllegalArgumentException if any of the given objects are null assertNotNull("Null argument not allowed", objects);
|