Package org.apache.lucene.util
Class FilterIterator<T>
- java.lang.Object
-
- org.apache.lucene.util.FilterIterator<T>
-
- All Implemented Interfaces:
java.util.Iterator<T>
public abstract class FilterIterator<T> extends java.lang.Object implements java.util.Iterator<T>
AnIterator
implementation that filters elements with a boolean predicate.- See Also:
predicateFunction(T)
-
-
Constructor Summary
Constructors Constructor Description FilterIterator(java.util.Iterator<T> baseIterator)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
T
next()
protected abstract boolean
predicateFunction(T object)
returns true, if this element should be returned bynext()
.void
remove()
-
-
-
Constructor Detail
-
FilterIterator
public FilterIterator(java.util.Iterator<T> baseIterator)
-
-
Method Detail
-
predicateFunction
protected abstract boolean predicateFunction(T object)
returns true, if this element should be returned bynext()
.
-
hasNext
public final boolean hasNext()
- Specified by:
hasNext
in interfacejava.util.Iterator<T>
-
remove
public final void remove()
- Specified by:
remove
in interfacejava.util.Iterator<T>
-
-