-
- Type Parameters:
I
- Type of the initiator of changes to the model.T
- Type of the object returned byTreeItem.getValue()
.
- All Superinterfaces:
io.reactivex.disposables.Disposable
- All Known Implementing Classes:
TreeDirectoryModel
public interface DirectoryModel<I,T> extends io.reactivex.disposables.Disposable
Observable model of multiple directory trees.- Author:
- claudio.rosati@esss.se
- See Also:
- LiveDirsFX:org.fxmisc.livedirs.DirectoryModel
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
DirectoryModel.Reporter<I>
API defining few reporting methods.static class
DirectoryModel.Update<I>
Represents an update to the directory model.static class
DirectoryModel.UpdateType
Types of updates to the director model.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
contains(Path path)
Indicates whether this directory model contains the givenpath
.io.reactivex.Observable<DirectoryModel.Update<I>>
creations()
io.reactivex.Observable<DirectoryModel.Update<I>>
deletions()
io.reactivex.Observable<Throwable>
errors()
TreeItem<T>
getRoot()
Returns a tree item that can be used as a root of aTreeView
.io.reactivex.Observable<DirectoryModel.Update<I>>
modifications()
-
-
-
Method Detail
-
contains
boolean contains(Path path)
Indicates whether this directory model contains the givenpath
.- Parameters:
path
- ThePath
to be verified.- Returns:
true
if the givenpath
is contained in this model.
-
creations
io.reactivex.Observable<DirectoryModel.Update<I>> creations()
- Returns:
- An observable stream of additions to the model.
-
deletions
io.reactivex.Observable<DirectoryModel.Update<I>> deletions()
- Returns:
- An observable stream of removals from the model.
-
errors
io.reactivex.Observable<Throwable> errors()
- Returns:
- An observable stream of errors.
-
getRoot
TreeItem<T> getRoot()
Returns a tree item that can be used as a root of aTreeView
.The returned TreeItem does not contain any
Path
(itsTreeItem.getValue()
method returnsnull
), but its children are roots of directory trees represented in this model. As a consequence, the returnedTreeItem
shall be used withTreeView.showRootProperty()
set tofalse
.
-
modifications
io.reactivex.Observable<DirectoryModel.Update<I>> modifications()
- Returns:
- An observable stream of file modifications in the model.
-
-