1 | static <A, B extends A> Set<A> setMinusSet(Set<A> l, Collection<B> stuff) { |
2 | if (empty(stuff)) ret l; |
3 | Set<B> set = asSet(stuff); |
4 | Set<A> l2 = similarEmptySet(l); |
5 | for (A a : l) if (!set.contains(a)) l2.add(a); |
6 | ret l2; |
7 | } |
8 | |
9 | static <A, B extends A> Set<A> setMinusSet(Cl<A> l, Collection<B> stuff) { |
10 | ret setMinusSet(asSet(l), stuff); |
11 | } |
Began life as a copy of #1007796
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1010472 |
Snippet name: | setMinusSet - set minus some elements |
Eternal ID of this version: | #1010472/4 |
Text MD5: | 382b3424d3b1e8f95b4b15abfbac6d0f |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-05-19 14:32:40 |
Source code size: | 352 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 612 / 599 |
Version history: | 3 change(s) |
Referenced in: | [show references] |