1 | static ItIt<IntRange> stepIntRange(final int length, final IntRange biggerRange, final int stepSize) {
|
2 | ret iteratorFromFunction(new F0<IntRange> {
|
3 | int i = biggerRange.start; |
4 | |
5 | public IntRange get() {
|
6 | if (i+length > biggerRange.end) null; |
7 | IntRange r = intRange(i, i+length); |
8 | i += stepSize; |
9 | ret r; |
10 | } |
11 | }); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1019244 |
| Snippet name: | stepIntRange - move an IntRange of fixed size through a bigger IntRange with a certain step size |
| Eternal ID of this version: | #1019244/2 |
| Text MD5: | ebb535a8c9cadb5e0ecc5489c34454ea |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-10-28 15:31:47 |
| Source code size: | 357 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 518 / 574 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |