1 | static L flattenList2(O... a) { |
2 | new L l; |
3 | if (a != null) for (O x : a) |
4 | if (x instanceof Collection) |
5 | for (O sub : (Collection) x) |
6 | l.addAll(flattenList2(sub)); |
7 | else if (x != null) |
8 | l.add(x); |
9 | ret l; |
10 | } |
Began life as a copy of #1004447
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: | #1017122 |
Snippet name: | flattenList2 |
Eternal ID of this version: | #1017122/5 |
Text MD5: | 50732e25be53342a80c3c63750126dd7 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-10-27 14:30:01 |
Source code size: | 238 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 483 / 531 |
Version history: | 4 change(s) |
Referenced in: | [show references] |