public final class Assert extends Object
| Modifier and Type | Method | Description |
|---|---|---|
static boolean |
isEmpty(Object o) |
Checks if an object has empty semantics.
|
static boolean |
isNonEmpty(Object o) |
Opposite of
isEmpty(Object). |
static <T> T |
requireNonEmpty(T value) |
Checks a value for emptiness and throws an IllegalArgumentException if it's empty.
|
static <T> T |
requireNonEmpty(T value,
String message) |
Checks a value for emptiness and throws an IllegalArgumentException if it's empty.
|
static int |
valueIsAtLeast(int value,
int minValue) |
public static boolean isEmpty(Object o)
nullCharSequenceIterableMapo - value to check for emptinesspublic static boolean isNonEmpty(Object o)
isEmpty(Object).o - value to check for non-emptinesspublic static <T> T requireNonEmpty(T value)
T - type of valuevalue - value to check for emptinesspublic static <T> T requireNonEmpty(T value,
String message)
T - type of valuevalue - value to check for emptinessmessage - message to provide in exceptionpublic static int valueIsAtLeast(int value,
int minValue)
Copyright © 1999-2018. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.