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

6
LINES

< > BotCompany Repo | #1023189 // reverseCIMap_noOverwrite - keep early mappings if there are conflicts

JavaX fragment (include)

static <A> Map<S, A> reverseCIMap_noOverwrite(Map<A, S> map) {
  Map<S, A> rmap = ciMap();
  for (A key : keys(map))
    putIfNotThere(rmap, map.get(key), key);
  ret rmap;
}

Author comment

Began life as a copy of #1017027

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023189
Snippet name: reverseCIMap_noOverwrite - keep early mappings if there are conflicts
Eternal ID of this version: #1023189/1
Text MD5: cd3cef5f5f2682155be8754177cc67b5
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-05-16 02:01:19
Source code size: 179 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 196 / 228
Referenced in: [show references]