org.chromattic.common.collection
Class FilterIterator<E,I>
java.lang.Object
org.chromattic.common.collection.AbstractFilterIterator<E,I>
org.chromattic.common.collection.FilterIterator<E,I>
- All Implemented Interfaces:
- Iterator<E>
public class FilterIterator<E,I>
- extends AbstractFilterIterator<E,I>
A convenient subclass for delegating the filtering function.
- Version:
- $Revision$
- Author:
- Julien Viet
|
Method Summary |
protected E |
adapt(I internal)
Adapts the internal element as an external element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterIterator
public FilterIterator(Iterator<I> iterator,
IteratorFilter<E,I> filter)
throws NullPointerException
- Creates a new filter iterator.
- Parameters:
iterator - the iteratorfilter - the filter
- Throws:
NullPointerException - if any argument is null
adapt
protected E adapt(I internal)
- Description copied from class:
AbstractFilterIterator
- Adapts the internal element as an external element. Returning a null external element means that
the element must be skipped and not considered by the iterator.
- Specified by:
adapt in class AbstractFilterIterator<E,I>
- Parameters:
internal - the internal element
- Returns:
- the external element
Copyright © 2010 eXo Platform SAS. All Rights Reserved.