1 | static MultiSet collectMultiSet(Collection c, S field) { |
2 | new MultiSet set; |
3 | for (O a : c) { |
4 | O val = getOpt(a, field); |
5 | if (val != null) |
6 | set.add(val); |
7 | } |
8 | ret set; |
9 | } |
10 | |
11 | static MultiSet mapMethodLike collectMultiSet(S field, Collection c) { |
12 | ret collectMultiSet(c, field); |
13 | } |
Began life as a copy of #1002504
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1005063 |
Snippet name: | collectMultiSet |
Eternal ID of this version: | #1005063/2 |
Text MD5: | 12176350355decefb602f63d2d794e54 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-12 23:38:41 |
Source code size: | 301 bytes / 13 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 556 / 577 |
Version history: | 1 change(s) |
Referenced in: | [show references] |