T
- the type of element returned by the iteratorpublic abstract class AbstractFilteredDirectoryStream<T> extends Object implements DirectoryStream<T>
DirectoryStream
that applies a filter to an
underlying entry iterator.DirectoryStream.Filter<T>
Modifier | Constructor and Description |
---|---|
protected |
AbstractFilteredDirectoryStream(DirectoryStream.Filter<? super T> filter) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected abstract void |
doClose()
Performs implementation-specific close actions.
|
protected abstract Iterator<T> |
entryIterator()
Creates and returns an iterator over the entries in this directory.
|
Iterator<T> |
iterator() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
protected AbstractFilteredDirectoryStream(DirectoryStream.Filter<? super T> filter)
public final void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
protected abstract void doClose() throws IOException
IOException
- if an I/O error occursprotected abstract Iterator<T> entryIterator()
The iterator is not required to be thread-safe, but otherwise must follow
the read-ahead contract outlined by DirectoryStream
.