public static <R, T1, T2> BiPredicate<T1, T2> compose(Predicate<R> predicate, BiFunction<T1, T2, R> function) {
        dbc.precondition(predicate != null, "cannot compose function with a null predicate");
        dbc.precondition(function != null, "cannot compose predicate with a null binary function");
        return (t1, t2) -> predicate.test(function.apply(t1, t2));
    }
public static < R , T1 , T2 > BiPredicate < T1 , T2 > compose ( Predicate < R > predicate , BiFunction < T1 , T2 , R > function ) { dbc . precondition ( predicate != null , "cannot compose function with a null predicate" ) ; dbc . precondition ( function != null , "cannot compose predicate with a null binary function" ) ; return ( t1 , t2 ) -> predicate . test ( function . apply ( t1 , t2 ) ) ; }
Composes a predicate with a binary function (predicate ° function).

@param <R> the predicate parameter type
@param <T1> the function first parameter type
@param <T2> the function second parameter type
@param predicate the predicate to be composed
@param function the function to be composed
@return the composed predicate