public class CheckUtils extends Object
| Constructor and Description |
|---|
CheckUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkNotEmpty(Collection<?> value)
Check that the given
Collection is not empty. |
static void |
checkNotEmpty(Collection<?> value,
String message)
Check that the given
Collection is not empty. |
static void |
checkNotEmpty(Object[] array)
Check that the given array is not empty.
|
static void |
checkNotEmpty(Object[] array,
String message)
Check that the given array is not empty.
|
static void |
checkNotNull(Object value)
Check that the given value is not null.
|
static void |
checkNotNull(Object value,
String message)
Check that the given value is not null.
|
public static void checkNotNull(Object value) throws IllegalArgumentException
IllegalArgumentException.value - Value to check.IllegalArgumentException - Exception thrown in case of null value.public static void checkNotNull(Object value, String message) throws IllegalArgumentException
IllegalArgumentException with the given
message.value - Value to check.message - Message to put in the IllegalArgumentException.IllegalArgumentException - Exception thrown in case of null value with the given message.public static void checkNotEmpty(Collection<?> value) throws IllegalArgumentException
Collection is not empty. If empty, throws an IllegalArgumentException.value - Collection to check.IllegalArgumentException - Exception thrown in case of empty Collection.public static void checkNotEmpty(Collection<?> value, String message) throws IllegalArgumentException
Collection is not empty. If empty, throws an IllegalArgumentException with the given
message.value - Collection to check.message - Message to put in the IllegalArgumentException.IllegalArgumentException - Exception thrown in case of empty Collection with the given message.public static void checkNotEmpty(Object[] array) throws IllegalArgumentException
IllegalArgumentException.array - Array to check.IllegalArgumentException - Exception thrown in case of empty array.public static void checkNotEmpty(Object[] array, String message) throws IllegalArgumentException
IllegalArgumentException with the given
message.array - Array to check.message - Message to put in the IllegalArgumentException.IllegalArgumentException - Exception thrown in case of empty array with the given message.Copyright © 2021 CNRS. All rights reserved.