Libraryless. Click here for Pure Java version (3021L/19K).
1 | static <A> int msNumberOfDuplicates(MultiSet<A> ms) {
|
2 | if (ms == null) ret 0; |
3 | ret countPred(keys(ms), a -> ms.get(a) > 1); |
4 | } |
Began life as a copy of #1028175
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1028181 |
| Snippet name: | msNumberOfDuplicates - count elements with count > 1 |
| Eternal ID of this version: | #1028181/6 |
| Text MD5: | b67843a5c186c422e943ddd5317870bf |
| Transpilation MD5: | d02c1e2b1620bf904564736b9c92ac64 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-05-25 14:18:57 |
| Source code size: | 130 bytes / 4 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 409 / 573 |
| Version history: | 5 change(s) |
| Referenced in: | [show references] |