public class Assert
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
static void |
equalTypesOrNull(java.lang.Object... objects) |
static void |
hasText(java.lang.String value,
java.lang.String name)
Ensures that the given
value contains characters. |
static void |
notEmpty(java.util.Collection<?> collection,
java.lang.String name) |
static void |
notEmpty(java.lang.String text,
java.lang.String name)
Same as
hasText(String, String) . |
static void |
notNull(java.lang.Object object,
java.lang.String name) |
public static void equalTypesOrNull(java.lang.Object... objects)
public static void notNull(java.lang.Object object, java.lang.String name)
public static void notEmpty(java.util.Collection<?> collection, java.lang.String name)
public static void notEmpty(java.lang.String text, java.lang.String name) throws java.lang.IllegalArgumentException
hasText(String, String)
.java.lang.IllegalArgumentException
hasText(String, String)
public static void hasText(java.lang.String value, java.lang.String name) throws java.lang.IllegalArgumentException
value
contains characters.value
- The value to check.name
- The name of the variable (used for the exception message).java.lang.IllegalArgumentException
- If the given value is null
or doesn't contain any non-whitespace
characters.