org.neo4j.helpers.collection
Class LimitingIterable<T>
java.lang.Object
org.neo4j.helpers.collection.LimitingIterable<T>
- Type Parameters:
T - the type of items in this Iterable.
- All Implemented Interfaces:
- Iterable<T>
public class LimitingIterable<T>
- extends Object
- implements Iterable<T>
Limits the amount of items returned by an Iterable, or rather
Iterators spawned from it.
- Author:
- Mattias Persson
- See Also:
LimitingIterator
|
Constructor Summary |
LimitingIterable(Iterable<T> source,
int limit)
Instantiates a new limiting Iterable which can limit the number
of items returned from iterators it spawns. |
LimitingIterable
public LimitingIterable(Iterable<T> source,
int limit)
- Instantiates a new limiting
Iterable which can limit the number
of items returned from iterators it spawns.
- Parameters:
source - the source of items.limit - the limit, i.e. the max number of items to return.
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T>
Copyright © 2002-2013 The Neo4j Graph Database Project. All Rights Reserved.