1 | static <A, B> MultiMap<B, A> reverseMultiMap(MultiMap<A, B> map) { |
2 | new MultiMap<B, A> mm; |
3 | for (A key : keys(map)) |
4 | for (B value : map.get(key)) |
5 | mm.put(value, key); |
6 | ret mm; |
7 | } |
Began life as a copy of #1016375
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017368 |
Snippet name: | reverseMultiMap |
Eternal ID of this version: | #1017368/1 |
Text MD5: | 8dd40fdf61df0d6432928aa3a139f526 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-18 13:35:00 |
Source code size: | 194 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 410 / 454 |
Referenced in: | [show references] |