// does not store null values static MultiMap multiMapIndexByField(Collection c, S field) { new MultiMap map; for (O a : c) { O val = getOpt(a, field); if (val != null) map.put(val, a); } ret map; } static MultiMap mapMethodLike multiMapIndexByField(S field, Collection c) { ret multiMapIndexByField(c, field); }
Began life as a copy of #1002467
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1011312 |
Snippet name: | multiMapIndexByField |
Eternal ID of this version: | #1011312/4 |
Text MD5: | ecf4dacf245ca4f414a94a34cc3eff9f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-31 23:50:03 |
Source code size: | 350 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 515 / 580 |
Version history: | 3 change(s) |
Referenced in: | [show references] |