Another groupingReduce overload

Brian Goetz brian.goetz at
Wed Feb 13 15:37:24 PST 2013

Write it!

While we regrettably cannot publish the Op APIs (to make stream 
pipelines extensible) yet, we will public Collector, and the Collectors 
we've already got are only a few lines of code each.  So you should be 
able to write this collector yourself, and have it play nicely with the 
pre-baked collectors.

On 2/13/2013 6:31 PM, Michael Nascimento wrote:
> Hi guys,
> Guava's uniqueIndex methods are pervasive in the code base I am using
> to evaluate lambda:
> A groupingReduce overload like this would be very handy:
>      public static <T, K> Collector<T, Map<K,T>>
> groupingReduce(Function<? super T, ? extends K> classifier) {
>          return groupingReduce(classifier, HashMap::new,
> Functions.identity(), throwingMerger());
>      }
> Is it possible to have it? Please? :-)
> Regards,
> Michael

More information about the lambda-dev mailing list