public static <A, B> Predicate<B> filtering(
        final Function<? super B, ? extends A> extractor,
        final Predicate<? super A> filter
    ) {
		requireNonNull(extractor);
		requireNonNull(filter);

        return value -> filter.test(extractor.apply(value));
    }
Accepts a function that extracts the filter key from a type {@code B},
and returns a {@code Predicate<B>} that tests the key using the specified
{@code filter}.

@param extractor the key extractor function
@param filter the {@code Predicate} used for testing the key
@return a predicate for testing a key
@param <A> the type of the object to test with the given filter
@param <B> the type of the object to test with the created filter
jenetics.incubator/src/main/java/io/jenetics/incubator/beans/Filters.java