org.neo4j.helpers.collection
Class FilteringIterator<T>
java.lang.Object
org.neo4j.helpers.collection.PrefetchingIterator<T>
org.neo4j.helpers.collection.FilteringIterator<T>
- Type Parameters:
T - the type of items in the iteration.
- All Implemented Interfaces:
- java.util.Iterator<T>
public class FilteringIterator<T>
- extends PrefetchingIterator<T>
An iterator which filters another iterator, only letting items with certain
criterias pass through. All iteration/filtering is done lazily.
|
Method Summary |
protected T |
fetchNextOrNull()
|
static
<T> java.util.Iterator<T> |
|
noDuplicates(java.util.Iterator<T> source)
|
static
<T> java.util.Iterator<T> |
|
notNull(java.util.Iterator<T> source)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilteringIterator
public FilteringIterator(java.util.Iterator<T> source,
Predicate<T> predicate)
fetchNextOrNull
protected T fetchNextOrNull()
- Specified by:
fetchNextOrNull in class PrefetchingIterator<T>
notNull
public static <T> java.util.Iterator<T> notNull(java.util.Iterator<T> source)
noDuplicates
public static <T> java.util.Iterator<T> noDuplicates(java.util.Iterator<T> source)
Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.