Libraryless. Click here for Pure Java version (56L/1K).
1 | static <A, B> Map<A, B> getMultipleKeys(Map<A, B> map, A... keys) { |
2 | Map<A, B> map2 = similarEmptyMap(map); |
3 | if (map != null && keys != null) for (A key : keys) |
4 | map2.put(key, map.get(key)); |
5 | ret map2; |
6 | } |
7 | |
8 | static <A, B> Map<A, B> getMultipleKeys(Map<A, B> map, Iterable<A> keys) { |
9 | Map<A, B> map2 = similarEmptyMap(map); |
10 | if (map != null && keys != null) for (A key : keys) |
11 | map2.put(key, map.get(key)); |
12 | ret map2; |
13 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017713 |
Snippet name: | getMultipleKeys |
Eternal ID of this version: | #1017713/2 |
Text MD5: | 71376698d0bdc09c9b01fce59d9881a1 |
Transpilation MD5: | ec915f5c7deffa0407fe130c56825553 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-09-10 18:36:27 |
Source code size: | 439 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 345 / 424 |
Version history: | 1 change(s) |
Referenced in: | [show references] |