Top Description Fields Constructors Methods
io.smallrye.common.resource

public final Class EmptyDirectoryStream<T>

extends Object
implements DirectoryStream<T>
Class Inheritance
All Implemented Interfaces
java.nio.file.DirectoryStream, java.lang.Iterable, java.io.Closeable, java.lang.AutoCloseable
Type Parameters
<T>
the entry type
Imports
java.nio.file.DirectoryStream, java.util.Collections, .Iterator

An empty directory stream.

Field Summary

Modifier and TypeField and Description
private static final EmptyDirectoryStream<Object>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
close()

Implements java.io.Closeable.close.

Closes this stream and releases any system resources associated with it.

public static <
the entry type
T
>
EmptyDirectoryStream<T>

Returns:

the singleton instance
instance
()

Returns the singleton instance.

public Iterator<T>
iterator()

Implements java.nio.file.DirectoryStream.iterator.

Returns the iterator associated with this DirectoryStream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCEback to summary
private static final EmptyDirectoryStream<Object> INSTANCE

Constructor Detail

EmptyDirectoryStreamback to summary
private EmptyDirectoryStream()

Method Detail

closeback to summary
public void close()

Implements java.io.Closeable.close.

Doc from java.io.Closeable.close.

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally mark the Closeable as closed, prior to throwing the IOException.

instanceback to summary
public static <T> EmptyDirectoryStream<T> instance()

Returns the singleton instance.

Parameters
<T>
the entry type
Returns:EmptyDirectoryStream<T>

the singleton instance

Annotations
@SuppressWarnings:unchecked
iteratorback to summary
public Iterator<T> iterator()

Implements java.nio.file.DirectoryStream.iterator.

Doc from java.nio.file.DirectoryStream.iterator.

Returns the iterator associated with this DirectoryStream.

Returns:Iterator<T>

the iterator associated with this DirectoryStream