1 | static <A, B> Map<A, B> filterMapByFunctionOnKey(Map<A, B> map, O f) { |
2 | Map<A, B> m2 = similarEmptyMap(map); |
3 | for (A a : keys(map)) { |
4 | if (isTrue(callF(f, a))) |
5 | m2.put(a, map.get(a)); |
6 | } |
7 | ret m2; |
8 | } |
9 | |
10 | static <A, B> Map<A, B> filterMapByFunctionOnKey(O f, Map<A, B> map) { |
11 | ret filterMapByFunctionOnKey(map, f); |
12 | } |
Began life as a copy of #1009585
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: | #1011670 |
Snippet name: | filterMapByFunctionOnKey - filter map by func(A) -> Bool |
Eternal ID of this version: | #1011670/5 |
Text MD5: | 814d5388d74dd1ed8e46d6dda6f920ab |
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:57:41 |
Source code size: | 334 bytes / 12 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 497 / 533 |
Version history: | 4 change(s) |
Referenced in: | [show references] |