TimurMahammadov / google-collections

Automatically exported from code.google.com/p/google-collections
Apache License 2.0
0 stars 0 forks source link

[RFE] Maps.transformValues #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
static Map<K,VT> 
Maps.transformValues(Map<K,VF>,Function<VF,VT>)

Doing this manually currently requires three calls and requires the ability
to reproduce the key function:
1. Lists.newArrayList(fromMap.values())
2. Lists.tranform(valueList, transformFunction)
3. uniqueIndex(transformedItems, keyFunction)

Although I suppose one could also call Lists.tranform(Lists.newArrayList)
on the entry Set and construct a new Map with the results.

Original issue reported on code.google.com by estebis...@gmail.com on 11 Apr 2008 at 4:41

GoogleCodeExporter commented 9 years ago
We've created such a method. It will be in our next release.

Original comment by jared.l....@gmail.com on 8 Sep 2008 at 8:20

GoogleCodeExporter commented 9 years ago
Terrific. Thanks!

Original comment by estebis...@gmail.com on 9 Sep 2008 at 12:47