org.apache.commons.io.filefilter
public class OrFileFilter extends AbstractFileFilter implements ConditionalFileFilter, Serializable
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: Commons IO 1.0
Version: $Revision: 606381 $ $Date: 2007-12-22 02:03:16 +0000 (Sat, 22 Dec 2007) $
Field Summary | |
---|---|
List | fileFilters The list of file filters. |
Constructor Summary | |
---|---|
OrFileFilter()
Constructs a new instance of OrFileFilter .
| |
OrFileFilter(List fileFilters)
Constructs a new instance of OrFileFilter
with the specified filters.
| |
OrFileFilter(IOFileFilter filter1, IOFileFilter filter2)
Constructs a new file filter that ORs the result of two other filters.
|
Method Summary | |
---|---|
boolean | accept(File file) |
boolean | accept(File file, String name) |
void | addFileFilter(IOFileFilter ioFileFilter) |
List | getFileFilters() |
boolean | removeFileFilter(IOFileFilter ioFileFilter) |
void | setFileFilters(List fileFilters) |
String | toString()
Provide a String representaion of this file filter.
|
OrFileFilter
.
Since: Commons IO 1.1
OrFileFilter
with the specified filters.
Parameters: fileFilters the file filters for this filter, copied, null ignored
Since: Commons IO 1.1
Parameters: filter1 the first filter, must not be null filter2 the second filter, must not be null
Throws: IllegalArgumentException if either filter is null
Returns: a String representaion