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 returntrueandfileSystem()will returnOptional.empty(). - The file system is still being created through
FileSystemMap.add(URI, Map)orFileSystemMap.addIfNotExists(URI, Map).isNotFound()will returnfalseandfileSystem()will returnOptional.empty(). - The file system has already been created through
FileSystemMap.add(URI, Map)orFileSystemMap.addIfNotExists(URI, Map).isNotFound()will returnfalseandfileSystem()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.booleanisNotFound()Returns whether or not the file system was found.
-
-
-
Method Detail
-
isNotFound
public boolean isNotFound()
Returns whether or not the file system was found. Afalsevalue means that the file system either has already been created, or is still being created.- Returns:
trueif the file system was not found, orfalseotherwise.
-
fileSystem
public Optional<S> fileSystem()
Returns the file system if available.- Returns:
- An
Optionaldescribing the file system if it has already been created, orOptional.empty()if it is still being created or was not found.
-
-