Libraryless. Click here for Pure Java version (7542L/42K).
1 | static Iterator iterator_gen(O o) {
|
2 | if (o == null) ret emptyItIt(); |
3 | if (o cast Iterator) ret o; |
4 | if (o cast Iterable) ret o.iterator(); |
5 | if (o cast O[]) ret arrayIterator(o); |
6 | fail("Not iterable: " + className(o));
|
7 | } |
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035106 |
| Snippet name: | iterator_gen |
| Eternal ID of this version: | #1035106/1 |
| Text MD5: | 24ec40e25cc9a4515b8be108a7c1f7f1 |
| Transpilation MD5: | 29277346aa67300e10f3f690a9d7d6d5 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-03-30 02:23:12 |
| Source code size: | 229 bytes / 7 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 702 / 833 |
| Referenced in: | [show references] |