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

6
LINES

< > BotCompany Repo | #1011030 // keysToMap

JavaX fragment (include)

1  
static <A, B> Map<A, B> keysToMap(Map<A, B> map, Collection<A> keys) {
2  
  Map<A, B> m2 = similarEmptyMap(map);
3  
  for (A a : unnull(keys))
4  
    mapPut(m2, a, map.get(a));
5  
  ret m2;
6  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1011030
Snippet name: keysToMap
Eternal ID of this version: #1011030/1
Text MD5: 80c9424393591b2851e14d3e5d0542e4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-11 19:40:56
Source code size: 184 bytes / 6 lines
Pitched / IR pitched: No / No
Views / Downloads: 439 / 491
Referenced in: [show references]