Package org.apache.commons.io.filefilter
Class DelegateFileFilter
java.lang.Object
org.apache.commons.io.filefilter.AbstractFileFilter
org.apache.commons.io.filefilter.DelegateFileFilter
- All Implemented Interfaces:
- FileFilter,- FilenameFilter,- Serializable,- FileVisitor<Path>,- PathMatcher,- PathFilter,- PathVisitor,- IOFileFilter
This class turns a Java FileFilter or FilenameFilter into an IO FileFilter.
 
Deprecating Serialization
Serialization is deprecated and will be removed in 3.0.
- Since:
- 1.0
- See Also:
- 
Field SummaryFields inherited from interface org.apache.commons.io.filefilter.IOFileFilterEMPTY_STRING_ARRAY
- 
Constructor SummaryConstructorsConstructorDescriptionDelegateFileFilter(FileFilter fileFilter) Constructs a delegate file filter around an existing FileFilter.DelegateFileFilter(FilenameFilter fileNameFilter) Constructs a delegate file filter around an existing FilenameFilter.
- 
Method SummaryMethods inherited from class org.apache.commons.io.filefilter.AbstractFileFilterhandle, postVisitDirectory, preVisitDirectory, visitFile, visitFileFailed
- 
Constructor Details- 
DelegateFileFilterConstructs a delegate file filter around an existing FileFilter.- Parameters:
- fileFilter- the filter to decorate
 
- 
DelegateFileFilterConstructs a delegate file filter around an existing FilenameFilter.- Parameters:
- fileNameFilter- the filter to decorate
 
 
- 
- 
Method Details- 
acceptTests the filter.- Specified by:
- acceptin interface- FileFilter
- Specified by:
- acceptin interface- IOFileFilter
- Overrides:
- acceptin class- AbstractFileFilter
- Parameters:
- file- the file to check
- Returns:
- true if the filter matches
 
- 
acceptTests the filter.- Specified by:
- acceptin interface- FilenameFilter
- Specified by:
- acceptin interface- IOFileFilter
- Overrides:
- acceptin class- AbstractFileFilter
- Parameters:
- dir- the directory
- name- the file name in the directory
- Returns:
- true if the filter matches
 
- 
toStringProvide a String representation of this file filter.- Overrides:
- toStringin class- AbstractFileFilter
- Returns:
- a String representation
 
 
-