open static fun notNull(@Nullable object: Any, message: String): Unit
Assert that an object is not null
.
Assert.notNull(clazz, "The class must not be null");
message
- the exception message to use if the assertion fails
IllegalArgumentException
- if the object is null
open static fun notNull(@Nullable object: Any, messageSupplier: Supplier<String>): Unit
Assert that an object is not null
.
Assert.notNull(clazz, () -> "The class '" + clazz.getName() + "' must not be null");
messageSupplier
- a supplier for the exception message to use if the assertion fails
IllegalArgumentException
- if the object is null
Since
5.0
open static fun notNull(@Nullable object: Any): Unit