static <A> bool setAddAllQuick(Collection<A> a, Collection<A> b) { Set<A> index = a instanceof Set ? (Set) a : new HashSet(a); bool change = false; for (A x : unnull(b)) if (!index.contains(x)) { a.add(x); if (index != a) index.add(x); change = true; } ret change; }
Began life as a copy of #1003016
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1006284 |
| Snippet name: | setAddAllQuick - make index first |
| Eternal ID of this version: | #1006284/3 |
| Text MD5: | 6611043917c58660616fab78eed223d2 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-08-03 19:29:31 |
| Source code size: | 310 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 776 / 772 |
| Version history: | 2 change(s) |
| Referenced in: | #1006285 - setAddAllFirstQuick - add to beginning of list #1006654 - Standard functions list 2 (LIVE, continuation of #761) |