net.sf.mmm.util.collection.base
Class FilteredIterable<E>
java.lang.Object
net.sf.mmm.util.collection.base.FilteredIterable<E>
- Type Parameters:
E - is the generic type of the iterated elements.
- All Implemented Interfaces:
- Iterable<E>
public class FilteredIterable<E>
- extends Object
- implements Iterable<E>
This is an implementation of an Iterator that adapts another
Iterator but only iterates the elements that are
accepted by a given Filter.
ATTENTION:
This implementation is using FilteredIterator. Please read according
javadoc first.
- Since:
- 2.0.0
- Author:
- Joerg Hohwiller (hohwille at users.sourceforge.net)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
delegate
private final Iterable<E> delegate
- The actual
Iterable instance to adapt.
filter
private final Filter<E> filter
- See Also:
iterator()
FilteredIterable
public FilteredIterable(Iterable<E> delegate,
Filter<E> filter)
- The constructor.
- Parameters:
delegate - is the Iterable to adapt.filter - is the Filter that filters the iterated elements.
iterator
public Iterator<E> iterator()
-
- Specified by:
iterator in interface Iterable<E>
Copyright © 2001-2010 mmm-Team. All Rights Reserved.