1 | static <A> MultiSet<A> multiSetSetIntersection(MultiSet<A> a, Set<A> b) { |
2 | MultiSet<A> ms = similarEmptyMultiSet(a); |
3 | Set<A> bSet = asSet(b); |
4 | for (A x : keys(a)) |
5 | if (bSet.contains(x)) |
6 | ms.add(x, a.get(x)); |
7 | ret ms; |
8 | } |
Began life as a copy of #1009544
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015425 |
Snippet name: | multiSetSetIntersection |
Eternal ID of this version: | #1015425/1 |
Text MD5: | 7c9771ee9a0abb8f73e219fb8d01e8e7 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-13 20:26:24 |
Source code size: | 237 bytes / 8 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 500 / 524 |
Referenced in: | [show references] |