|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbe.fgov.ehealth.etee.crypto.utils.Preconditions
public final class Preconditions
Utility class to check method arguments for various conditions.
| Method Summary | ||
|---|---|---|
static java.util.Collection |
checkNotEmpty(java.util.Collection argument,
java.lang.String message)
Check if the given collection is not null or empty. |
|
static java.lang.Object[] |
checkNotEmpty(java.lang.Object[] argument,
java.lang.String message)
Check if the given array is not null or empty. |
|
static
|
checkNotNull(T argument)
Check if the given argument is not null. |
|
static
|
checkNotNull(T argument,
java.lang.String message)
Check if the given argument is not null. |
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T checkNotNull(T argument)
T - The type of the argument.argument - The argument that needs to be checked.
java.lang.IllegalArgumentException - If the given argument is null.
public static <T> T checkNotNull(T argument,
java.lang.String message)
T - The type of the argument.argument - The argument that needs to be checked.message - The error message that should be given when the argument is null.
java.lang.IllegalArgumentException - If the given argument is null.
public static java.util.Collection checkNotEmpty(java.util.Collection argument,
java.lang.String message)
argument - The argument that needs to be checked.message - The error message that should be given when the argument is null or empty.
java.lang.IllegalArgumentException - If the given argument is null or empty.
public static java.lang.Object[] checkNotEmpty(java.lang.Object[] argument,
java.lang.String message)
argument - The argument that needs to be checked.message - The error message that should be given when the argument is null or empty.
java.lang.IllegalArgumentException - If the given argument is null or empty.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||