public final class Preconditions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
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 <T> T |
checkNotNull(T argument)
Check if the given argument is not null.
|
static <T> T |
checkNotNull(T argument,
java.lang.String message)
Check if the given argument is not null.
|
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.Copyright © 2025 eHealth. All rights reserved.