public class FilterIterator<E> extends AbstractIterator<E> implements CloseableIterator<E>
CloseableIterator and will close the provided iterator if it also implemented CloseableIterator.
This iterator supports removal as long as the provided iterator supports removal. Although note only entries returned by the filter can be removed.
| Constructor and Description |
|---|
FilterIterator(Iterator<E> iter,
Predicate<? super E> filter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected E |
getNext()
Method to implement to provide an iterator implementation.
|
void |
remove() |
forEachRemaining, hasNext, nextclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, hasNext, nextprotected E getNext()
AbstractIteratorgetNext in class AbstractIterator<E>public void close()
close in interface AutoCloseableclose in interface CloseableIterator<E>Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.