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
,AbstractRegexPatternFileListFilter
,AbstractSimplePatternFileListFilter
,AcceptAllFileListFilter
,AcceptOnceFileListFilter
,ChainFileListFilter
,CompositeFileListFilter
,ExpressionFileListFilter
,FileSystemMarkerFilePresentFileListFilter
,FileSystemPersistentAcceptOnceFileListFilter
,FtpLastModifiedFileListFilter
,FtpPersistentAcceptOnceFileListFilter
,FtpRegexPatternFileListFilter
,FtpSimplePatternFileListFilter
,FtpSystemMarkerFilePresentFileListFilter
,IgnoreHiddenFileListFilter
,LastModifiedFileListFilter
,NioFileLocker
,RegexPatternFileListFilter
,SftpLastModifiedFileListFilter
,SftpPersistentAcceptOnceFileListFilter
,SftpRegexPatternFileListFilter
,SftpSimplePatternFileListFilter
,SftpSystemMarkerFilePresentFileListFilter
,SimplePatternFileListFilter
,SmbLastModifiedFileListFilter
,SmbPersistentAcceptOnceFileListFilter
,SmbRegexPatternFileListFilter
,SmbSimplePatternFileListFilter
,SmbSystemMarkerFilePresentFileListFilter
- 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
- Author:
- Iwein Fuld, Josh Long, Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Filter a single file; only called externally ifsupportsSingleFileFiltering()
returns true.filterFiles
(F[] 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 boolean
Return true if this filter is being used for recursion.default boolean
Indicates that this filter supports filtering a single file.
-
Method Details
-
filterFiles
Filters out files and returns the files that are left in a list, or an empty list when a null is passed in.- Parameters:
files
- The files.- Returns:
- The filtered files.
-
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 or not to filter based on the full path.
- Since:
- 5.3.6
-