Libraryless. Click here for Pure Java version (5489L/30K).
1 | meta-for MultiMap also as MultiSetMap {
|
2 | static <A, B> MultiMap<A, B> keysWithMultipleValuesOnly(MultiMap<A, B> mm) {
|
3 | new MultiMap<A, B> mm2; |
4 | for (A key : mm.keySet()) |
5 | if (l(mm.get(key)) > 1) |
6 | mm2.putAll(key, mm.get(key)); |
7 | ret mm2; |
8 | } |
9 | } |
Began life as a copy of #1004753
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: | #1004755 |
| Snippet name: | keysWithMultipleValuesOnly - filter MultiMap or MultiSetMap |
| Eternal ID of this version: | #1004755/4 |
| Text MD5: | cd4fe97b0b2b6448031283d0a329b02a |
| Transpilation MD5: | f941a75d86556d494b24ef1c945db97d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-11 04:23:27 |
| Source code size: | 271 bytes / 9 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 854 / 950 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |