| Modifier and Type | Method and Description |
|---|---|
static <T> T |
checkArgument(T obj,
Predicate<T> condition)
Check that the specified object reference is not null and respect the condition
|
static <T> T |
checkArgument(T obj,
Predicate<T> condition,
String message)
Check that the specified object reference is not null and respect the condition
|
public static <T> T checkArgument(T obj,
Predicate<T> condition)
obj - the object reference to check for conditionIllegalArgumentException - if object is does not respect the conditionNullPointerException - if object is nullpublic static <T> T checkArgument(T obj,
Predicate<T> condition,
String message)
obj - the object reference to check for conditionmessage - details message to be used in the event that is throwsIllegalArgumentException - if object is does not respect the conditionNullPointerException - if object is nullCopyright © 2021. All rights reserved.