Package org.apache.lucene.util
Class FilterIterator<T,InnerT extends T>
- java.lang.Object
-
- org.apache.lucene.util.FilterIterator<T,InnerT>
-
- Type Parameters:
T
- generic parameter for this iterator instance: this iterator implementsIterator<T>
InnerT
- generic parameter of the wrapped iterator, must beT
or extendT
- All Implemented Interfaces:
Iterator<T>
public abstract class FilterIterator<T,InnerT extends T> extends Object implements Iterator<T>
AnIterator
implementation that filters elements with a boolean predicate.- See Also:
predicateFunction(InnerT)
- NOTE: This API is for internal purposes only and might change in incompatible ways in the next release.
-
-
Constructor Summary
Constructors Constructor Description FilterIterator(Iterator<InnerT> baseIterator)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
protected abstract boolean
predicateFunction(InnerT object)
returns true, if this element should be returned bynext()
.void
remove()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-