Substitute for groupingReduce ?

Brian Goetz brian.goetz at
Wed Mar 20 13:00:29 PDT 2013

> So there is no substitute that assumes the returned value is a unique
> index and throws an Exception if it is not? This is what
> Maps.uniqueIndex does:

Oh, I see now.  You were using throwingMerger as your reducer.  Not how 
it was intended, but works.  You can do:

   cities.groupingBy(City::getName, reducing(throwingMergeFunction()));

More information about the lambda-dev mailing list