Package org.apache.commons.vfs2.filter
Class OrFileFilter
java.lang.Object
org.apache.commons.vfs2.filter.OrFileFilter
- All Implemented Interfaces:
- Serializable,- FileFilter,- ConditionalFileFilter
A 
FileFilter providing conditional OR logic across a list of
 file filters. This filter returns true if any filters in the list
 return true. Otherwise, it returns false. Checking of the
 file filter list stops when the first filter returns true.- Since:
- 2.4
- Author:
- This code was originally ported from Apache Commons IO File Filter
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionDefault constructor.OrFileFilter(List<FileFilter> fileFilters) Constructs a new instance ofOrFileFilterwith the specified filters.OrFileFilter(FileFilter... filters) Constructs a new file filter that ORs the result of other filters.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanaccept(FileSelectInfo fileSelectInfo) Determines if a file or folder should be selected.voidaddFileFilter(FileFilter fileFilter) Adds the specified file filter to the list of file filters at the end of the list.Returns this conditional file filter's list of file filters.booleanremoveFileFilter(FileFilter fileFilter) Removes the specified file filter.voidsetFileFilters(List<FileFilter> fileFilters) Sets the list of file filters, replacing any previously configured file filters on this filter.toString()Provide a String representation of this file filter.
- 
Constructor Details- 
OrFileFilterpublic OrFileFilter()Default constructor.
- 
OrFileFilterConstructs a new file filter that ORs the result of other filters.- Parameters:
- filters- array of filters, must not be null or empty
 
- 
OrFileFilterConstructs a new instance ofOrFileFilterwith the specified filters.- Parameters:
- fileFilters- the file filters for this filter, copied, null ignored
 
 
- 
- 
Method Details- 
acceptDescription copied from interface:FileFilterDetermines if a file or folder should be selected.- Specified by:
- acceptin interface- FileFilter
- Parameters:
- fileSelectInfo- the file or folder to select.
- Returns:
- true if the file should be selected.
- Throws:
- FileSystemException- Thrown for file system errors (since 2.4.)
 
- 
addFileFilterDescription copied from interface:ConditionalFileFilterAdds the specified file filter to the list of file filters at the end of the list.- Specified by:
- addFileFilterin interface- ConditionalFileFilter
- Parameters:
- fileFilter- the filter to be added
 
- 
getFileFiltersDescription copied from interface:ConditionalFileFilterReturns this conditional file filter's list of file filters.- Specified by:
- getFileFiltersin interface- ConditionalFileFilter
- Returns:
- the file filter list
 
- 
removeFileFilterDescription copied from interface:ConditionalFileFilterRemoves the specified file filter.- Specified by:
- removeFileFilterin interface- ConditionalFileFilter
- Parameters:
- fileFilter- filter to be removed
- Returns:
- trueif the filter was found in the list,- falseotherwise
 
- 
setFileFiltersDescription copied from interface:ConditionalFileFilterSets the list of file filters, replacing any previously configured file filters on this filter.- Specified by:
- setFileFiltersin interface- ConditionalFileFilter
- Parameters:
- fileFilters- the list of filters
 
- 
toStringProvide a String representation of this file filter.
 
-