org.apache.lucene.util
Class FilterIterator<T>
java.lang.Object
org.apache.lucene.util.FilterIterator<T>
- All Implemented Interfaces:
- Iterator<T>
public abstract class FilterIterator<T>
- extends Object
- implements Iterator<T>
An Iterator
implementation that filters elements with a boolean predicate.
- See Also:
predicateFunction(T)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilterIterator
public FilterIterator(Iterator<T> baseIterator)
predicateFunction
protected abstract boolean predicateFunction(T object)
- returns true, if this element should be returned by
next()
.
hasNext
public final boolean hasNext()
- Specified by:
hasNext
in interface Iterator<T>
next
public final T next()
- Specified by:
next
in interface Iterator<T>
remove
public final void remove()
- Specified by:
remove
in interface Iterator<T>
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.