public class AssertUtil
extends java.lang.Object
Members are copied from org.springframework.util.Assert class
Original Assert class authors: Keith Donald Juergen Hoeller Sam Brannen Colin Sampaleanu Rob Harrop
| Modifier and Type | Method and Description |
|---|---|
static void |
isTrue(boolean condition,
java.lang.String message) |
static void |
notEmpty(java.util.Collection<?> collection,
java.lang.String message)
Assert that a collection contains elements; that is, it must not be
null and must contain at least one element. |
static void |
notEmpty(java.lang.Object[] array,
java.lang.String message)
Assert that an array contains elements; that is, it must not be
null and must contain at least one element. |
static void |
notNull(java.lang.Object object,
java.lang.String message)
Assert that an object is not
null. |
public static void notNull(java.lang.Object object,
java.lang.String message)
null.
Assert.notNull(clazz, "The class must not be null");
object - the object to checkmessage - the exception message to use if the assertion failsjava.lang.IllegalArgumentException - if the object is nullpublic static void notEmpty(java.lang.Object[] array,
java.lang.String message)
null and must contain at least one element.
Assert.notEmpty(array, "The array must contain elements");
array - the array to checkmessage - the exception message to use if the assertion failsjava.lang.IllegalArgumentException - if the object array is null or contains no elementspublic static void notEmpty(java.util.Collection<?> collection,
java.lang.String message)
null and must contain at least one element.
Assert.notEmpty(collection, "Collection must contain elements");
collection - the collection to checkmessage - the exception message to use if the assertion failsjava.lang.IllegalArgumentException - if the collection is null or
contains no elementspublic static void isTrue(boolean condition,
java.lang.String message)