Libraryless. Click here for Pure Java version (3123L/18K).
// does not store null values static <B, A> MultiMap<B, A> lambdaMapLike multiMapIndex(IF1<A, B> f, Iterable<A> l) { new MultiMap<B, A> map; fOr (A a : l) { B val = f.get(a); if (val != null) map.put(val, a); } ret map; } static <B, A> MultiMap lambdaMapLike multiMapIndex(Iterable<A> l, IF1<A, B> f) { ret multiMapIndex(f, l); }
Began life as a copy of #1011312
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, ekrmjmnbrukm, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027804 |
| Snippet name: | multiMapIndex |
| Eternal ID of this version: | #1027804/6 |
| Text MD5: | 0099a133b91c1b09038d181be1f7959a |
| Transpilation MD5: | 5e2eaa77262b194f7f641d593d7c0ab8 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-06-28 15:32:12 |
| Source code size: | 369 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 441 / 601 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |