1 | static S[] toStringArray(Collection<S> c) {
|
2 | S[] a = new S[l(c)]; |
3 | Iterator<S> it = c.iterator(); |
4 | for (int i = 0; i < l(a); i++) |
5 | a[i] = it.next(); |
6 | ret a; |
7 | } |
8 | |
9 | static S[] toStringArray(O o) {
|
10 | if (o instanceof S[]) |
11 | return (S[]) o; |
12 | else if (o instanceof Collection) |
13 | return toStringArray((Collection<S>) o); |
14 | else |
15 | throw fail("Not a collection or array: " + getClassName(o));
|
16 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1001235 |
| Snippet name: | toStringArray |
| Eternal ID of this version: | #1001235/2 |
| Text MD5: | 5886166aed044c1ac946f978a429f0fb |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-03-15 03:20:18 |
| Source code size: | 414 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1501 / 5528 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |