public final class Assert extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
assertThat(boolean condition,
String propOrMsg,
String msgSuffix,
T rv)
General assertion mwthos
|
static String |
hasLength(String str,
String propOrMsg)
Assert that the given String is not empty
|
static String |
hasText(String str,
String propOrMsg)
Assert that the given String has actual non-whitepsace text.
|
static boolean |
isFalse(boolean condition,
String propOrMsg)
Assert that the given condition is true
|
static boolean |
isTrue(boolean condition,
String propOrMsg)
Assert that the given condition is true
|
static <C extends Collection<?>> |
notEmpty(C col,
String propOrMsg)
Assert that the given Collection is not empty
|
static <M extends Map<?,?>> |
notEmpty(M map,
String propOrMsg)
Assert that the given Map is not empty
|
static <T> T[] |
notEmpty(T[] objects,
String propOrMsg)
Assert that the given array is not empty
|
static <T> T |
notNull(T object,
String propOrMsg)
Assert that the given object is not null
|
public static String hasText(String str, String propOrMsg)
str - propOrMsg - public static <T> T notNull(T object,
String propOrMsg)
T - object - propOrMsg - public static String hasLength(String str, String propOrMsg)
str - propOrMsg - public static <T> T[] notEmpty(T[] objects,
String propOrMsg)
T - objects - propOrMsg - public static <M extends Map<?,?>> M notEmpty(M map, String propOrMsg)
M - map - propOrMsg - public static <C extends Collection<?>> C notEmpty(C col, String propOrMsg)
C - col - propOrMsg - public static boolean isTrue(boolean condition,
String propOrMsg)
condition - propOrMsg - public static boolean isFalse(boolean condition,
String propOrMsg)
condition - propOrMsg - Copyright © 2017. All rights reserved.