Module io.smallrye.common.resource
Package io.smallrye.common.resource
Class MappedDirectoryStream<T,R>
java.lang.Object
io.smallrye.common.resource.MappedDirectoryStream<T,R>
- Type Parameters:
T- the input entry typeR- the output entry type
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<R>,DirectoryStream<R>
A directory stream to map one kind of entry to another.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.nio.file.DirectoryStream
DirectoryStream.Filter<T> -
Constructor Summary
ConstructorsConstructorDescriptionMappedDirectoryStream(DirectoryStream<T> delegate, Function<T, R> mappingFunction) Construct a new instance. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MappedDirectoryStream
Construct a new instance.- Parameters:
delegate- the delegate stream (must not benull)mappingFunction- the mapping function (must not benull)
-
-
Method Details
-
iterator
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-