Libraryless. Click here for Pure Java version (2074L/13K).
1 | static MultiMap mapLike mapMultiMapValueLists(O func, MultiMap mm) {
|
2 | MultiMap m = similarEmptyMultiMap(mm); |
3 | for (O key : keys(mm)) |
4 | for (O value : mm.getActual(key)) |
5 | m.addAll(key, (Cl) callF(func, value)); |
6 | ret m; |
7 | } |
8 | |
9 | static MultiMap mapMultiMapValueLists(MultiMap mm, O func) {
|
10 | ret mapMultiMapValueLists(func, mm); |
11 | } |
12 | |
13 | static <A, B, C, D extends Cl<C>> MultiMap<A, C> mapMultiMapValueLists(IF1<B, D> func, MultiMap<A, B> mm) {
|
14 | ret mapMultiMapValueLists((O) func, mm); |
15 | } |
Began life as a copy of #1020213
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1024836 |
| Snippet name: | mapMultiMapValueLists - apply function to a MultiMap's value lists |
| Eternal ID of this version: | #1024836/1 |
| Text MD5: | 8ae613a134360d06a85e15b00604a541 |
| Transpilation MD5: | 79ed362593438f594918fe0b8a026dc6 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-08-26 19:22:50 |
| Source code size: | 500 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 399 / 535 |
| Referenced in: | [show references] |