public abstract class Assert extends Object
| Constructor and Description |
|---|
Assert() |
| Modifier and Type | Method and Description |
|---|---|
static void |
isNull(Object object,
String errorMsg) |
static void |
isTrue(boolean expression,
String errorMsg) |
static <T> Collection<T> |
notEmpty(Collection<T> collection,
String errorMsg) |
static <K,V> Map<K,V> |
notEmpty(Map<K,V> map,
String errorMsg) |
static Object[] |
notEmpty(Object[] array,
String errorMsg) |
static String |
notEmpty(String text,
String errorMsg) |
static <T> T |
notNull(T object,
String errorMsg) |
public static void isTrue(boolean expression,
String errorMsg)
throws IllegalArgumentException
IllegalArgumentExceptionpublic static void isNull(Object object, String errorMsg) throws IllegalArgumentException
IllegalArgumentExceptionpublic static <T> T notNull(T object,
String errorMsg)
throws NullPointerException
NullPointerExceptionpublic static String notEmpty(String text, String errorMsg) throws IllegalArgumentException
IllegalArgumentExceptionpublic static Object[] notEmpty(Object[] array, String errorMsg) throws IllegalArgumentException
IllegalArgumentExceptionpublic static <T> Collection<T> notEmpty(Collection<T> collection, String errorMsg) throws IllegalArgumentException
IllegalArgumentExceptionpublic static <K,V> Map<K,V> notEmpty(Map<K,V> map, String errorMsg) throws IllegalArgumentException
IllegalArgumentExceptionCopyright © 2018. All rights reserved.