android/guava/src/com/google/common/base/Functions.java
public static <T> Function<T, Boolean> forPredicate(Predicate<T> predicate) {
    return new PredicateFunction<T>(predicate);
  }
public static <T> Function<T, Boolean> forPredicate(Predicate<T> predicate) {
    return new PredicateFunction<T>(predicate);
  }
Creates a function that returns the same boolean output as the given predicate for all inputs.

<p>The returned function is <i>consistent with equals</i> (as documented at {@link
Function#apply}) if and only if {@code predicate} is itself consistent with equals.

<p><b>Java 8 users:</b> use the method reference {@code predicate::test} instead.