public final class PreconditionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
checkArgument(boolean expression)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
static void |
checkArgument(boolean expression,
Object errorMessage)
Ensures the truth of an expression involving one or more parameters to the calling method.
|
public static void checkArgument(boolean expression)
expression - a boolean expressionIllegalArgumentException - if expression is falsepublic static void checkArgument(boolean expression, @Nullable Object errorMessage)
expression - a boolean expressionerrorMessage - the exception message to use if the check fails; will be converted to a
string using String.valueOf(Object)IllegalArgumentException - if expression is falseCopyright © 2024 Global Biodiversity Information Facility (GBIF). All rights reserved.