T
- Element typepublic final class LimitedIterator<T> extends Object implements Iterator<T>
This is a decorator over an existing iterator. Returns elements of the original iterator, until either the requested number of items have been returned or the underlying iterator has been exhausted.
There is no thread-safety guarantee.
Constructor and Description |
---|
LimitedIterator(Iterator<T> iterator,
int limit)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEachRemaining, remove
Copyright © 2017 Cactoos. All rights reserved.