1 | static <A, B> MultiMap<B, A> reverseMapAsMultiMap(Map<A, B> map) { |
2 | ret reverseMapAsMultiMap(map, new MultiMap); |
3 | } |
4 | |
5 | static <A, B> MultiMap<B, A> reverseMapAsMultiMap(Map<A, B> map, MultiMap<B, A> mm) { |
6 | for (A key : keys(map)) |
7 | mm.put(map.get(key), key); |
8 | ret mm; |
9 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1004754 |
Snippet name: | reverseMapAsMultiMap |
Eternal ID of this version: | #1004754/3 |
Text MD5: | 60b05dee43b05415c8928b3ba9595e68 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-04-23 20:33:28 |
Source code size: | 279 bytes / 9 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 576 / 591 |
Version history: | 2 change(s) |
Referenced in: | [show references] |