public abstract class Args
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
requireNonNull(V value,
java.lang.String message)
Require that the given value is not null and return it
|
static <V> V |
requireSatisfies(V value,
java.util.function.Predicate<V> predicate,
java.lang.String message)
Require that the given value satisfies the given predicate
|
@Nonnull
public static <V> V requireNonNull(V value,
@Nonnull
java.lang.String message)
V - the value typevalue - the value to checkmessage - the error message to usejava.lang.IllegalArgumentException - if the value does not satisfy the requirementpublic static <V> V requireSatisfies(@Nullable
V value,
@Nonnull
java.util.function.Predicate<V> predicate,
@Nonnull
java.lang.String message)
V - the value typevalue - the value to checkpredicate - the predicate to satisfymessage - the error message to usejava.lang.IllegalArgumentException - if the value does not satisfy the requirement