public final class Assert extends Object
IllegalArgumentException with the specified message.| Modifier and Type | Method and Description |
|---|---|
static void |
hasText(String object,
String message)
Asserts if the given String is not empty
|
static void |
notEmpty(Collection<?> collection,
String message)
Asserts if the given Collection is not empty
|
static void |
notNull(Object object,
String message)
Asserts if the passed object is not
null |
static void |
state(boolean expression,
String message)
Asserts if the passed expression is
true |
public static void state(boolean expression,
String message)
throws IllegalArgumentException
trueexpression - returns booleanmessage - exception messageIllegalArgumentException - if the assertion failspublic static void notNull(Object object, String message)
nullobject - nullable objectmessage - exception messageIllegalArgumentException - if the assertion failspublic static void hasText(String object, String message)
object - nullable Stringmessage - exception messageIllegalArgumentException - if the assertion failspublic static void notEmpty(Collection<?> collection, String message)
collection - nullable Collectionmessage - exception messageIllegalArgumentException - if the assertion failsCopyright © 2025 Picodata. All rights reserved.