Returns a collector that only accumulates the elements matching the given predicate.
pred |
a predicate function |
downstream |
a downstream collector |
the collector implementation |