1 | static <A, B extends A> Collection<B> copyList(Collection<B> a, Collection<A> b) { |
2 | if (a != null && b != null && a != b) { |
3 | b.clear(); |
4 | b.addAll(a); |
5 | } |
6 | ret a; |
7 | } |
Began life as a copy of #1009516
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1009526 |
Snippet name: | copyList - copy all elements of one collection to another, clearing the second one first; see also replaceCollection; returns first collection |
Eternal ID of this version: | #1009526/7 |
Text MD5: | aede44435aa3480c642b8b9b1e200d62 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-11-29 00:58:07 |
Source code size: | 177 bytes / 7 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 632 / 700 |
Version history: | 6 change(s) |
Referenced in: | [show references] |