Returns a predicate that evaluates to {@code true} if each of its components evaluates to {@code true}. The components are evaluated in order, and evaluation will be "short-circuited" as soon as a false predicate is found. It defensively copies the iterable passed in, so future changes to it won't a
(
Iterable<? extends Predicate<? super T>> components)
| 106 | * <p><b>Discouraged:</b> Prefer using {@code first.and(second).and(third).and(...)}. |
| 107 | */ |
| 108 | public static <T extends @Nullable Object> Predicate<T> and( |
| 109 | Iterable<? extends Predicate<? super T>> components) { |
| 110 | return new AndPredicate<>(defensiveCopy(components)); |
| 111 | } |
| 112 | |
| 113 | /** |
| 114 | * Returns a predicate that evaluates to {@code true} if each of its components evaluates to |