T
- type of elements to aggregatepublic class BatchingIterator<T> extends Object implements Iterator<List<T>>
The source iterator is consumed in this process.
Note: Subsequent calls to the next()
method return a reference to the same batch, and only update the
contents of the batch. If you plan to reuse intermediate results, you'll need to explicitly copy them.
Constructor and Description |
---|
BatchingIterator(Iterator<T> source,
int batchSize) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
List<T> |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
Copyright © 2018. All rights reserved.