jetbrains.buildServer.util.filters
Class FilteredIterable<T>

java.lang.Object
  extended by jetbrains.buildServer.util.filters.FilteredIterable<T>
All Implemented Interfaces:
java.lang.Iterable<T>

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

Wraps any Iterable and allows filtered retrieval of its content according to the filter provided.
Example:

List stringList;
...
for(String s: new FilteredIterable(stringList, someFilter))
{
// iterating through all elements that passes filtration implemented in someFilter
}

Author:
Sergey.Anchipolevsky Date: 20.08.2007

Constructor Summary
FilteredIterable(java.lang.Iterable<T> delegate, Filter<? super T> filter)
           
 
Method Summary
 java.util.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(@NotNull
                        java.lang.Iterable<T> delegate,
                        @NotNull
                        Filter<? super T> filter)
Method Detail

iterator

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