public class Assert extends Object
Modifier and Type | Method and Description |
---|---|
static void |
equalTypesOrNull(Object... objects) |
static void |
hasText(String value,
String name)
Ensures that the given
value contains characters. |
static void |
notEmpty(Collection<?> collection,
String name) |
static void |
notEmpty(String text,
String name)
Same as
hasText(String, String) . |
static void |
notNull(Object object,
String name) |
public static void equalTypesOrNull(Object... objects)
public static void notEmpty(Collection<?> collection, String name)
public static void notEmpty(String text, String name) throws IllegalArgumentException
hasText(String, String)
.IllegalArgumentException
hasText(String, String)
public static void hasText(String value, String name) throws IllegalArgumentException
value
contains characters.value
- The value to check.name
- The name of the variable (used for the exception message).IllegalArgumentException
- If the given value is null
or doesn't contain any non-whitespace
characters.Copyright © 2015. All rights reserved.