public static < T > Iterable < T > filter ( final Iterable < T > sequence , final Predicate < ? super T > filter ) { return new Iterable < T > ( ) { @ Override public Iterator < T > iterator ( ) { return new FilteringIterator < T > ( sequence . iterator ( ) , filter ) ; } } ; }
Exclude all elements from an iterable that don t match a given predicate .