()
| 109 | } |
| 110 | |
| 111 | public void forceChunk() { |
| 112 | if(_chunk != null) return; |
| 113 | |
| 114 | Object[] arr = new Object[CHUNK_SIZE]; |
| 115 | int n = 0; |
| 116 | Object val = start; |
| 117 | while(n < CHUNK_SIZE) { |
| 118 | arr[n++] = val; |
| 119 | val = Numbers.addP(val, step); |
| 120 | if(boundsCheck.exceededBounds(val)) { |
| 121 | //partial last chunk |
| 122 | _chunk = new ArrayChunk(arr, 0, n); |
| 123 | return; |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | // full last chunk |
| 128 | if(boundsCheck.exceededBounds(val)) { |
| 129 | _chunk = new ArrayChunk(arr, 0, CHUNK_SIZE); |
| 130 | return; |
| 131 | } |
| 132 | |
| 133 | // full intermediate chunk |
| 134 | _chunk = new ArrayChunk(arr, 0, CHUNK_SIZE); |
| 135 | _chunkNext = new Range(val, end, step, boundsCheck); |
| 136 | } |
| 137 | |
| 138 | public ISeq next() { |
| 139 | if(_next != null) |
no test coverage detected