T
- generic parameter for this iterator instance: this iterator implements Iterator<T>
InnerT
- generic parameter of the wrapped iterator, must be T or extend Tpublic abstract class FilterIterator<T,InnerT extends T>
extends java.lang.Object
implements java.util.Iterator<T>
Iterator
implementation that filters elements with a boolean predicate.predicateFunction(InnerT)
Constructor and Description |
---|
FilterIterator(java.util.Iterator<InnerT> baseIterator) |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext() |
T |
next() |
protected abstract boolean |
predicateFunction(InnerT object)
returns true, if this element should be returned by
next() . |
void |
remove() |
public FilterIterator(java.util.Iterator<InnerT> baseIterator)
protected abstract boolean predicateFunction(InnerT object)
next()
.public final boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public final void remove()
remove
in interface java.util.Iterator<T>
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.