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

8
LINES

< > BotCompany Repo | #1015354 // intersectMapWithSetByKey

JavaX fragment (include)

1  
static <A, B> Map<A, B> intersectMapWithSetByKey(Map<A, B> map, Set<A> set) {
2  
  Map<A, B> m2 = similarEmptyMap(map);
3  
  for (A a, B b : map) {
4  
    if (contains(set, a))
5  
      m2.put(a, b);
6  
  }
7  
  ret m2;
8  
}

Author comment

Began life as a copy of #1011670

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: #1015354
Snippet name: intersectMapWithSetByKey
Eternal ID of this version: #1015354/1
Text MD5: f21f73858596fc7af3e01343d9418cb7
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-13 12:58:17
Source code size: 210 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 265 / 307
Referenced in: [show references]