1 | static <A, B> Map<B, A> reverseMap(Map<A, B> map) { |
2 | new Map<B, A> rmap; |
3 | for (A key : keys(map)) |
4 | rmap.put(map.get(key), key); |
5 | ret rmap; |
6 | } |
Began life as a copy of #1004754
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1006196 |
Snippet name: | reverseMap |
Eternal ID of this version: | #1006196/1 |
Text MD5: | 706e623a66e5f7cef91469b73394d900 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2016-12-23 00:50:26 |
Source code size: | 151 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 533 / 543 |
Referenced in: | [show references] |