1 | static class CombinedSet<A> extends AbstractSet<A> { |
2 | new L<Set<A>> sets; |
3 | |
4 | *() {} |
5 | *(Set<A>... sets) { addAllNonNulls(this.sets, sets); } |
6 | |
7 | public int size() { ret lengthLevel2(sets); } |
8 | public Iterator<A> iterator() { fail(); } |
9 | public bool contains(O o) { |
10 | for (Set<A> set : sets) |
11 | if (set.contains(o)) |
12 | true; |
13 | false; |
14 | } |
15 | } |
Began life as a copy of #1018030
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1021317 |
Snippet name: | CombinedSet - only supports size() [estimated] and contains() |
Eternal ID of this version: | #1021317/6 |
Text MD5: | 34d4eb23aca2f5e6ce7f841be6b06193 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-15 12:57:24 |
Source code size: | 366 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 317 / 815 |
Version history: | 5 change(s) |
Referenced in: | [show references] |