Fun { public static <K, V, P, Q> BiPredicate<K, V> composeTest2(final @NotNull Function<? super K, ? extends P> inputTFunction, final @NotNull Function<? super V, ? extends Q> inputUFunction, final @NotNull BiPredicate<? super P, ? super Q> testResult) { return (inputK, inputV) -> testResult.test(inputTFunction.apply(inputK), inputUFunction.apply(inputV)); } private  Fun(); static Stream<T> streamIt(final @Nullable T element); @SuppressWarnings("OptionalUsedAsFieldOrParameterType") static Stream<T> streamOpt(final @NotNull Optional<T> element); static Function<T, T> tee(final @NotNull Consumer<? super T> consumer); static Function<T, R> constantly1(final @NotNull Supplier<? extends R> supplier); static BiFunction<K, V, R> constantly2(final @NotNull Supplier<? extends R> supplier); static Function<T, R> compose1(final @NotNull Function<T, ? extends I> before, final @NotNull Function<? super I, ? extends R> after); static Supplier<S> compose0(final @NotNull Supplier<? extends R> before, final @NotNull Function<? super R, ? extends S> after); static BiFunction<K, V, R> compose2(final @NotNull BiFunction<K, V, ? extends I> before, final @NotNull Function<? super I, ? extends R> after); static Predicate<T> composeTest1(final @NotNull Function<? super T, ? extends P> inputFunction,
                 final @NotNull Predicate<? super P> testResult); static BiPredicate<K, V> composeTest2(final @NotNull Function<? super K, ? extends P> inputTFunction,
                 final @NotNull Function<? super V, ? extends Q> inputUFunction,
                 final @NotNull BiPredicate<? super P, ? super Q> testResult); static BiPredicate<K, V> composeTest2(final @NotNull BiFunction<? super K, ? super V, ? extends P> inputFunction,
                 final @NotNull Predicate<? super P> testResult); static Consumer<T> toVoid1(final @NotNull Function<? super T, ?> inputFunction); static BiConsumer<K, V> toVoid2(final @NotNull BiFunction<? super K, ? super V, ?> inputFunction); static Function<T, R> infer1(final @NotNull Function<? super T, ? extends R> methodRef); static BiFunction<K, V, R> infer2(final @NotNull BiFunction<? super K, ? super V, ? extends R> methodRef); static Supplier<T> infer0(final @NotNull Supplier<? extends T> methodRef); static Predicate<T> inferTest1(final @NotNull Predicate<? super T> methodRef); static BiPredicate<K, V> inferTest2(final @NotNull BiPredicate<? super K, ? super V> methodRef); static ThrowingFunction<T, Nothing> throwingVoidToNothing1(final @NotNull ThrowingConsumer<? super T> mayThrowOnAccept); static ThrowingBiFunction<K, V, Nothing> throwingVoidToNothing2(final @NotNull ThrowingBiConsumer<? super K, ? super V> mayThrowOnAccept); static Function<Map.Entry<K, V>, Map.Entry<K, V>> entryTee(final @NotNull BiConsumer<? super K, ? super V> consumer); static Function<K, Map.Entry<K, V>> zipKeysWithValueFunc(final @NotNull Function<? super K, ? extends V> valueFunc); static Function<V, Map.Entry<K, V>> zipValuesWithKeyFunc(final @NotNull Function<? super V, ? extends K> keyFunction); static Map.Entry<K, V> toEntry(final @Nullable K key, final @Nullable V value); static BinaryOperator<V> keepFirstMerger(); static BinaryOperator<V> keepLastMerger(); static BinaryOperator<V> throwingMerger(); static Collector<Map.Entry<K, V>, ?, Map<K, V>> entriesToMap(); static Collector<Map.Entry<K, V>, ?, Map<K, V>> entriesToMapOfType(final @NotNull Supplier<Map<K, V>> mapSupplier); static Collector<Map.Entry<K, V>, ?, Map<K, V>> entriesToMap(final @NotNull BinaryOperator<V> mergeFunction); static Collector<Map.Entry<K, V>, ?, Map<K, V>> entriesToMapOfType(final @NotNull Supplier<Map<K, V>> mapSupplier, final @NotNull BinaryOperator<V> mergeFunction); static Function<Map.Entry<K, V>, R> mapEntry(final @NotNull BiFunction<? super K, ? super V, ? extends R> biMapFunction); static Function<Map.Entry<K, V>, Map.Entry<K, W>> mapValue(final @NotNull BiFunction<? super K, ? super V, ? extends W> valueBiFunction); static Function<Map.Entry<K, V>, Map.Entry<K, W>> mapValue(final @NotNull Function<? super V, ? extends W> valueFunction); static Function<Map.Entry<K, V>, Map.Entry<L, V>> mapKey(final @NotNull BiFunction<? super K, ? super V, ? extends L> keyBiFunction); static Function<Map.Entry<K, V>, Map.Entry<L, V>> mapKey(final @NotNull Function<? super K, ? extends L> keyFunction); static Consumer<Map.Entry<K, V>> onEntry(final @NotNull BiConsumer<? super K, ? super V> biConsumer); static Consumer<Map.Entry<K, V>> onKey(final @NotNull Consumer<? super K> consumer); static Consumer<Map.Entry<K, V>> onValue(final @NotNull Consumer<? super V> consumer); static Predicate<? super Map.Entry<K, V>> testEntry(final @NotNull BiPredicate<? super K, ? super V> biPredicate); static Predicate<? super Map.Entry<K, V>> testValue(final @NotNull Predicate<? super V> valuePredicate); static Predicate<? super Map.Entry<K, V>> testKey(final @NotNull Predicate<? super K> keyPredicate); static Predicate<T> inSet(final @NotNull S haystack); static Predicate<K> isKeyIn(final @NotNull M haystack); static Predicate<V> isValueIn(final @NotNull M haystack); static Function<T, M> composeTry1(final @NotNull Function<? super R, ? extends M> monadUnit,
                final @NotNull Supplier<? extends M> monadZero,
                final @NotNull ThrowingFunction<? super T, ? extends R> mayThrowOnApply,
                final @Nullable BiConsumer<? super T, ? super Exception> onError); static Function<T, M> composeTry1(final @NotNull Function<? super R, ? extends M> monoidSuccess,
                final @NotNull Function<? super Exception, ? extends M> monoidError,
                final @NotNull ThrowingFunction<? super T, ? extends R> mayThrowOnApply); static Supplier<M> composeTry0(final @NotNull Function<? super R, ? extends M> monadUnit,
                final @NotNull Supplier<? extends M> monadZero,
                final @NotNull ThrowingSupplier<? extends R> mayThrowOnGet,
                final @Nullable Consumer<? super Exception> onError); static Supplier<M> composeTry0(final @NotNull Function<? super R, ? extends M> monoidSuccess,
                final @NotNull Function<? super Exception, ? extends M> monoidError,
                final @NotNull ThrowingSupplier<? extends R> mayThrowOnGet); static BiFunction<K, V, M> composeTry2(final @NotNull Function<? super R, ? extends M> monadUnit,
                final @NotNull Supplier<? extends M> monadZero,
                final @NotNull ThrowingBiFunction<? super K, ? super V, ? extends R> mayThrowOnApply,
                final @Nullable BiConsumer<? super Map.Entry<? super K, ? super V>, ? super Exception> onError); static BiFunction<K, V, M> composeTry2(final @NotNull Function<? super R, ? extends M> monoidSuccess,
                final @NotNull Function<? super Exception, ? extends M> monoidError,
                final @NotNull ThrowingBiFunction<? super K, ? super V, ? extends R> mayThrowOnApply); static Supplier<R> uncheck0(final @NotNull ThrowingSupplier<? extends R> mayThrowOnGet); static Supplier<Result<R>> result0(final @NotNull ThrowingSupplier<? extends R> mayThrowOnGet); static Function<T, R> uncheck1(final @NotNull ThrowingFunction<? super T, ? extends R> mayThrowOnApply); static Function<T, Result<R>> result1(final @NotNull ThrowingFunction<? super T, ? extends R> mayThrowOnApply); static BiFunction<K, V, R> uncheck2(final @NotNull ThrowingBiFunction<? super K, ? super V, ? extends R> mayThrowOnApply); static BiFunction<K, V, Result<R>> result2(final @NotNull ThrowingBiFunction<? super K, ? super V, ? extends R> mayThrowOnApply); static Predicate<T> uncheckTest1(final @NotNull ThrowingPredicate<? super T> mayThrowOnTest); static BiPredicate<K, V> uncheckTest2(final @NotNull ThrowingBiPredicate<? super K, ? super V> mayThrowOnTest); static Consumer<T> uncheckVoid1(final @NotNull ThrowingConsumer<? super T> mayThrowOnAccept); static Function<T, Result<Nothing>> resultNothing1(final @NotNull ThrowingConsumer<? super T> mayThrowOnAccept); static BiConsumer<K, V> uncheckVoid2(final @NotNull ThrowingBiConsumer<? super K, ? super V> mayThrowOnAccept); static BiFunction<K, V, Result<Nothing>> resultNothing2(final @NotNull ThrowingBiConsumer<? super K, ? super V> mayThrowOnAccept); static Predicate<T> testOrDefault1(final @NotNull ThrowingPredicate<? super T> mayThrowOnTest, boolean defaultValue); static BiPredicate<K, V> testOrDefault2(final @NotNull ThrowingBiPredicate<? super K, ? super V> mayThrowOnTest, boolean defaultValue); static Supplier<R> tryOrDefault0(final @NotNull ThrowingSupplier<R> mayThrowOnGet, @Nullable R defaultValue); static Function<T, R> tryOrDefault1(final @NotNull ThrowingFunction<? super T, R> mayThrowOnApply, @Nullable R defaultValue); static BiFunction<K, V, R> tryOrDefault2(final @NotNull ThrowingBiFunction<? super K, ? super V, R> mayThrowOnApply, @Nullable R defaultValue); static Supplier<Optional<R>> tryOrOptional0(final @NotNull ThrowingSupplier<R> mayThrowOnGet); static Function<T, Optional<R>> tryOrOptional1(final @NotNull ThrowingFunction<? super T, R> mayThrowOnApply); static BiFunction<K, V, Optional<R>> tryOrOptional2(final @NotNull ThrowingBiFunction<? super K, ? super V, R> mayThrowOnApply); static Consumer<T> tryOrVoid1(final @NotNull ThrowingConsumer<? super T> mayThrowOnAccept); static BiConsumer<K, V> tryOrVoid2(final @NotNull ThrowingBiConsumer<? super K, ? super V> mayThrowOnAccept);  }
@Test public void testComposeTest2BiFunction() { final BiFunction<String, Integer, String> chomp = (string, length) -> string.substring(0, length); final BiPredicate<String, Integer> sentinelStartsWith = composeTest2(chomp, sentinel::startsWith); assertTrue("chomp an input string to a length test if sentinel::startsWith", sentinelStartsWith.test("senile", 3)); assertFalse("chomp an input string to a length test if sentinel::startsWith", sentinelStartsWith.test("straighten", 2)); }