Libraryless. Click here for Pure Java version (2199L/14K).
static ArrayList asList_gen(O o) { if (o == null) new ArrayList; if (o cast Iterable) ret asList(o); if (o cast O[]) ret asList(o); fail("Can't convert to list: " + className(o)); }
Began life as a copy of #1000999
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1027461 |
| Snippet name: | asList_gen - always returns a new ArrayList (no wrapping). generic version accepting Object |
| Eternal ID of this version: | #1027461/2 |
| Text MD5: | 018c9f0226c8ae30d1026bff8675a48a |
| Transpilation MD5: | f82d857a33a442869f631af3a6aba34d |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-03-22 13:02:39 |
| Source code size: | 194 bytes / 6 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 366 / 485 |
| Version history: | 1 change(s) |
| Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |