org.onebusaway.utility.filter
Class FilteredIterable<T>

java.lang.Object
  extended by org.onebusaway.utility.filter.FilteredIterable<T>
All Implemented Interfaces:
Iterable<T>

public class FilteredIterable<T>
extends Object
implements Iterable<T>

An iterable adapter that selectively filters a source Iterable given a IFilter to apply.

Author:
bdferris

Constructor Summary
FilteredIterable(Iterable<T> source, IFilter<T> filter)
           
 
Method Summary
static
<T> Iterable<T>
filter(Iterable<T> source, IFilter<T> filter)
           
 Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilteredIterable

public FilteredIterable(Iterable<T> source,
                        IFilter<T> filter)
Method Detail

filter

public static <T> Iterable<T> filter(Iterable<T> source,
                                     IFilter<T> filter)

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 2012 OneBusAway. All Rights Reserved.