Libraryless. Click here for Pure Java version (2712L/16K).
1 | static persistable class ListWalker<A> implements Iterator<A> { |
2 | L<A> list; |
3 | int index; |
4 | |
5 | *(L<A> *list) {} |
6 | |
7 | public A next() { |
8 | if (index < l(list)) |
9 | ret list.get(index++); |
10 | null; |
11 | } |
12 | |
13 | public bool hasNext() { |
14 | ret index < l(list); |
15 | } |
16 | } |
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt
No comments. add comment
Snippet ID: | #1030668 |
Snippet name: | ListWalker |
Eternal ID of this version: | #1030668/3 |
Text MD5: | 8b174b440958cee1dbf04ab14a1916e5 |
Transpilation MD5: | a123fe99acf8da6edbd3e87efd8dd917 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2021-02-25 20:58:27 |
Source code size: | 277 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 238 / 441 |
Version history: | 2 change(s) |
Referenced in: | [show references] |