public abstract class SearchFilter extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchFilter.FolderResult
Result of filtering a folder.
|
Constructor and Description |
---|
SearchFilter() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
searchFile(FileObject file)
Answers a question whether a given file should be searched.
|
abstract boolean |
searchFile(URI fileUri)
Answers a question whether a given URI should be searched.
|
abstract SearchFilter.FolderResult |
traverseFolder(FileObject folder)
Answers a questions whether a given folder should be traversed (its
contents searched).
|
abstract SearchFilter.FolderResult |
traverseFolder(URI folderUri)
Answers a questions whether a given URI should be traversed (its
contents searched).
|
public abstract boolean searchFile(@NonNull FileObject file) throws IllegalArgumentException
true
if the given file should be searched;
false
if notIllegalArgumentException
- if the passed
FileObject
is a folderpublic abstract boolean searchFile(@NonNull URI fileUri)
true
if the given file should be searched;
false
if notIllegalArgumentException
- if the passed
URI
is a folder@NonNull public abstract SearchFilter.FolderResult traverseFolder(@NonNull FileObject folder) throws IllegalArgumentException
SearchFilter.FolderResult
. If
TRAVERSE_ALL_SUBFOLDERS
is returned, this filter will not be
applied on the folder's children (both direct and indirect, both files
and folders)IllegalArgumentException
- if the passed
FileObject
is not a folder@NonNull public abstract SearchFilter.FolderResult traverseFolder(@NonNull URI folderUri) throws IllegalArgumentException
SearchFilter.FolderResult
. If
TRAVERSE_ALL_SUBFOLDERS
is returned, this filter will not be
applied on the folder's children (both direct and indirect, both files
and folders)IllegalArgumentException
- if the passed
URI
is not a folder