public abstract class Assert
extends java.lang.Object
| Constructor and Description |
|---|
Assert() |
| Modifier and Type | Method and Description |
|---|---|
static void |
isTrue(boolean expression,
java.util.function.Supplier<java.lang.String> message)
Throws an IllegalArgumentException if the boolean expression is false.
|
static void |
notNull(java.lang.Object object,
java.lang.String message)
Throws an IllegalArgumentException if the object is null.
|
static void |
notNull(java.lang.Object object,
java.util.function.Supplier<java.lang.String> message)
Throws an IllegalArgumentException if the object is null.
|
public static void notNull(@Nullable
java.lang.Object object,
java.lang.String message)
object - the objectmessage - the exception message to use if nulljava.lang.IllegalArgumentException - if the object is nullpublic static void notNull(@Nullable
java.lang.Object object,
@NonNull
java.util.function.Supplier<java.lang.String> message)
object - the objectmessage - the exception message to use if nulljava.lang.IllegalArgumentException - if the object is nullpublic static void isTrue(boolean expression,
@NonNull
java.util.function.Supplier<java.lang.String> message)
expression - a boolean expressionmessage - the exception message to use if falsejava.lang.IllegalArgumentException - if the expression is false