Neo4j Enterprise

org.neo4j.helpers.collection
Class FilteringIterable<T>

java.lang.Object
  extended by org.neo4j.helpers.collection.FilteringIterable<T>
Type Parameters:
T - the type of items in the iteration.
All Implemented Interfaces:
java.lang.Iterable<T>

public class FilteringIterable<T>
extends java.lang.Object
implements java.lang.Iterable<T>

An iterable which filters another iterable, only letting items with certain criterias pass through. All iteration/filtering is done lazily.


Constructor Summary
FilteringIterable(java.lang.Iterable<T> source, Predicate<T> predicate)
           
 
Method Summary
 java.util.Iterator<T> iterator()
           
static
<T> java.lang.Iterable<T>
noDuplicates(java.lang.Iterable<T> source)
           
static
<T> Predicate<T>
noDuplicatesPredicate()
           
static
<T> java.lang.Iterable<T>
notNull(java.lang.Iterable<T> source)
           
static
<T> Predicate<T>
notNullPredicate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteringIterable

public FilteringIterable(java.lang.Iterable<T> source,
                         Predicate<T> predicate)
Method Detail

iterator

public java.util.Iterator<T> iterator()
Specified by:
iterator in interface java.lang.Iterable<T>

notNull

public static <T> java.lang.Iterable<T> notNull(java.lang.Iterable<T> source)

noDuplicates

public static <T> java.lang.Iterable<T> noDuplicates(java.lang.Iterable<T> source)

noDuplicatesPredicate

public static <T> Predicate<T> noDuplicatesPredicate()

notNullPredicate

public static <T> Predicate<T> notNullPredicate()

Neo4j Enterprise

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.