> 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()));