MCPcopy
hub / github.com/google/guava / and

Method and

guava/src/com/google/common/base/Predicates.java:108–111  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 15

filterFilteredMethod · 0.95
createCombinedMethod · 0.95
filterMethod · 0.95
filterKeysMethod · 0.95
filterFilteredMethod · 0.95
filterMethod · 0.95
testAnd_applyNoArgsMethod · 0.95
testAnd_applyOneArgMethod · 0.95

Calls 3

defensiveCopyMethod · 0.95
asListMethod · 0.95
checkNotNullMethod · 0.45

Tested by 15

testAnd_applyNoArgsMethod · 0.76
testAnd_applyOneArgMethod · 0.76
testAnd_applyBinaryMethod · 0.76
testAnd_applyTernaryMethod · 0.76