Interface FileListFilter<F>
- Type Parameters:
F- The type that will be filtered.
- All Known Subinterfaces:
DiscardAwareFileListFilter<F>, ResettableFileListFilter<F>, ReversibleFileListFilter<F>
- All Known Implementing Classes:
AbstractDirectoryAwareFileListFilter, AbstractFileListFilter, AbstractFileLockerFilter, AbstractLastModifiedFileListFilter, AbstractMarkerFilePresentFileListFilter, AbstractPersistentAcceptOnceFileListFilter, AbstractRecentFileListFilter, AbstractRegexPatternFileListFilter, AbstractSimplePatternFileListFilter, AcceptAllFileListFilter, AcceptOnceFileListFilter, ChainFileListFilter, CompositeFileListFilter, ExpressionFileListFilter, FileSystemMarkerFilePresentFileListFilter, FileSystemPersistentAcceptOnceFileListFilter, IgnoreHiddenFileListFilter, LastModifiedFileListFilter, NioFileLocker, RecentFileListFilter, RegexPatternFileListFilter, SimplePatternFileListFilter
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Strategy interface for filtering a group of files. This is a generic filter intended
to work with either local files or references to remote files.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanFilter a single file; only called externally ifsupportsSingleFileFiltering()returns true.filterFiles(F @Nullable [] files) Filters out files and returns the files that are left in a list, or an empty list when a null is passed in.default booleanReturn true if this filter is being used for recursion.default booleanIndicates that this filter supports filtering a single file.
-
Method Details
-
filterFiles
-
accept
Filter a single file; only called externally ifsupportsSingleFileFiltering()returns true.- Parameters:
file- the file.- Returns:
- true if the file passes the filter, false to filter.
- Since:
- 5.2
- See Also:
-
supportsSingleFileFiltering
default boolean supportsSingleFileFiltering()Indicates that this filter supports filtering a single file. Filters that return true must overrideaccept(Object). Default false.- Returns:
- true to allow external calls to
accept(Object). - Since:
- 5.2
- See Also:
-
isForRecursion
default boolean isForRecursion()Return true if this filter is being used for recursion.- Returns:
- whether to filter based on the full path.
- Since:
- 5.3.6
-