T - the type of items in this Iterator.public class LimitingIterator<T> extends PrefetchingIterator<T>
Iterator.| Constructor and Description |
|---|
LimitingIterator(Iterator<T> source,
int limit)
Instantiates a new limiting iterator which iterates over
source
and if limit items have been returned the next PrefetchingIterator.hasNext()
will return false. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
limitReached() |
hasNext, next, peek, removepublic LimitingIterator(Iterator<T> source, int limit)
source
and if limit items have been returned the next PrefetchingIterator.hasNext()
will return false.source - the source of items.limit - the limit, i.e. the max number of items to return.Copyright © 2002–2015 The Neo4j Graph Database Project. All rights reserved.