Class AbstractFileListFilter<F>
java.lang.Object
org.springframework.integration.file.filters.AbstractFileListFilter<F>
- Type Parameters:
F
- the target protocol file type.
- All Implemented Interfaces:
FileListFilter<F>
- Direct Known Subclasses:
AbstractDirectoryAwareFileListFilter
,AbstractFileLockerFilter
,AcceptAllFileListFilter
,AcceptOnceFileListFilter
,ExpressionFileListFilter
,IgnoreHiddenFileListFilter
A convenience base class for any
FileListFilter
whose criteria can be
evaluated against each File in isolation. If the entire List of files is
required for evaluation, implement the FileListFilter interface directly.- Author:
- Mark Fisher, Iwein Fuld, Gary Russell, Ngoc Nhan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Subclasses must implement this method.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.boolean
Indicates that this filter supports filtering a single file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.integration.file.filters.FileListFilter
isForRecursion
-
Constructor Details
-
AbstractFileListFilter
public AbstractFileListFilter()
-
-
Method Details
-
filterFiles
Description copied from interface:FileListFilter
Filters out files and returns the files that are left in a list, or an empty list when a null is passed in.- Specified by:
filterFiles
in interfaceFileListFilter<F>
- Parameters:
files
- The files.- Returns:
- The filtered files.
-
supportsSingleFileFiltering
public boolean supportsSingleFileFiltering()Description copied from interface:FileListFilter
Indicates that this filter supports filtering a single file. Filters that return true must overrideFileListFilter.accept(Object)
. Default false.- Specified by:
supportsSingleFileFiltering
in interfaceFileListFilter<F>
- Returns:
- true to allow external calls to
FileListFilter.accept(Object)
. - See Also:
-
accept
Subclasses must implement this method.- Specified by:
accept
in interfaceFileListFilter<F>
- Parameters:
file
- The file.- Returns:
- true if the file passes the filter.
- See Also:
-