Package com.github.robtimus.filesystems
Class FileSystemMap.FileSystemStatus<S extends FileSystem>
- java.lang.Object
-
- com.github.robtimus.filesystems.FileSystemMap.FileSystemStatus<S>
-
- Type Parameters:
S
- The type of file system.
- Enclosing class:
- FileSystemMap<S extends FileSystem>
public static final class FileSystemMap.FileSystemStatus<S extends FileSystem> extends Object
The status for a file system. There are three different possibilities:- The file system was not found or has already been removed.
isNotFound()
will returntrue
andfileSystem()
will returnOptional.empty()
. - The file system is still being created through
FileSystemMap.add(URI, Map)
orFileSystemMap.addIfNotExists(URI, Map)
.isNotFound()
will returnfalse
andfileSystem()
will returnOptional.empty()
. - The file system has already been created through
FileSystemMap.add(URI, Map)
orFileSystemMap.addIfNotExists(URI, Map)
.isNotFound()
will returnfalse
andfileSystem()
will return a non-emptyOptional
.
- Author:
- Rob Spoor
- Since:
- 2.3
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<S>
fileSystem()
Returns the file system if available.boolean
isNotFound()
Returns whether or not the file system was found.
-
-
-
Method Detail
-
isNotFound
public boolean isNotFound()
Returns whether or not the file system was found. Afalse
value means that the file system either has already been created, or is still being created.- Returns:
true
if the file system was not found, orfalse
otherwise.
-
fileSystem
public Optional<S> fileSystem()
Returns the file system if available.- Returns:
- An
Optional
describing the file system if it has already been created, orOptional.empty()
if it is still being created or was not found.
-
-