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