public abstract class SearchFilterDefinition extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SearchFilterDefinition.FolderResult
Result of filtering a folder.
|
Constructor and Description |
---|
SearchFilterDefinition() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
searchFile(FileObject file)
Answers a question whether a given file should be searched.
|
boolean |
searchFile(URI uri)
Answers a question whether a file with given URI should be searched.
|
abstract SearchFilterDefinition.FolderResult |
traverseFolder(FileObject folder)
Answers a questions whether a given folder should be traversed (its
contents searched).
|
SearchFilterDefinition.FolderResult |
traverseFolder(URI uri)
Answers a questions whether a folder with 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 folder@NonNull public abstract SearchFilterDefinition.FolderResult traverseFolder(@NonNull FileObject folder) throws IllegalArgumentException
SearchFilterDefinition.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 folderpublic boolean searchFile(@NonNull URI uri)
FileObject
instance for each
URI and passes it to SearchFilterDefinition.searchFile(FileObject)
. Override to improve
performance.true
if the given file should be searched;
false
if notIllegalArgumentException
- if the passed
FileObject
is a folder@NonNull public SearchFilterDefinition.FolderResult traverseFolder(@NonNull URI uri) throws IllegalArgumentException
FileObject
instance for each
URI and passes it to SearchFilterDefinition.traverseFolder(FileObject)
. Override to
improve performance.SearchFilterDefinition.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