public final class Assertions extends Object
| Constructor and Description |
|---|
Assertions() |
| Modifier and Type | Method and Description |
|---|---|
static void |
keyPresent(String key,
Map<String,?> map)
Throw IllegalStateException if key is not present in map.
|
static <T> void |
notNull(String name,
T value)
Throw IllegalArgumentException if the value is null.
|
public static <T> void notNull(String name, T value)
T - the value type.name - the parameter name.value - the value that should not be null.IllegalArgumentException - if value is null.public static void keyPresent(String key, Map<String,?> map)
key - the key to expect.map - the map to search.IllegalArgumentException - if key is not in map.