RFR 8144675: Add a filtering collector

Paul Sandoz paul.sandoz at oracle.com
Sat Dec 5 13:18:41 UTC 2015


> On 4 Dec 2015, at 23:05, Brian Goetz <brian.goetz at Oracle.COM> wrote:
> 
> This seems reasonable; mapping() already exists for use in this space (as a combinator for the downstream collector of groupingBy and friends), filtering() is also reasonable in this context.
> 

Agreed, i like it, and will review it more closely next week.

FWIW one can use Collectors.flatMapping to achieve similar functionality, but it’s a little awkward for such filtering use-cases.

Thanks,
Paul.



More information about the core-libs-dev mailing list