public final class Preconditions extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
precondition(T validate,
Predicate<? super T> predicate,
Supplier<String> errorSupplier) |
public static <T> T precondition(T validate,
Predicate<? super T> predicate,
Supplier<String> errorSupplier)
T - validate - argument to be validatedpredicate - to check againsterrorSupplier - the error message generatorIllegalArgumentException - if predicate returns trueCopyright © 2021. All rights reserved.