Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data


< > BotCompany Repo | #1006196 - reverseMap

JavaX fragment (include)

static <A, B> Map<B, A> reverseMap(Map<A, B> map) {
  new Map<B, A> rmap;
  for (A key : keys(map))
    rmap.put(map.get(key), key);
  ret rmap;

Author comment

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: 378 / 365
Referenced in: [show references]