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

8
LINES

< > BotCompany Repo | #1015354 // intersectMapWithSetByKey

JavaX fragment (include)

static <A, B> Map<A, B> intersectMapWithSetByKey(Map<A, B> map, Set<A> set) {
  Map<A, B> m2 = similarEmptyMap(map);
  for (A a, B b : map) {
    if (contains(set, a))
      m2.put(a, b);
  }
  ret m2;
}

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: 313 / 372
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)