Collector Variants
Richard Warburton
richard.warburton at gmail.com
Sun Jul 21 12:19:52 PDT 2013
Hi,
partitioningBy and groupingBy both have a variant with a default
downstream collector, eg:
public static <T, K> Collector<T, ?, Map<K, List<T>>>
groupingBy(Function<? super T, ? extends K> classifier)
Is there any reason why there is no such equivalent for mapping? It would
seem to be a fairly common use case (at least from my Collector usage).
Especially given that I seem to be using mapping as a downstream collector
for groupingBy or partitioningBy rather than anything else. In which case
why not have the 'leaf' collection default be the same?
regards,
Dr. Richard Warburton
http://insightfullogic.com
@RichardWarburto <http://twitter.com/richardwarburto>
More information about the lambda-dev
mailing list