org.apache.commons.io.filefilter
public class AndFileFilter extends AbstractFileFilter implements ConditionalFileFilter, Serializable
true
if all filters in the
list return true
. Otherwise, it returns false
.
Checking of the file filter list stops when the first filter returns
false
.
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 | |
---|---|
AndFileFilter()
Constructs a new instance of AndFileFilter .
| |
AndFileFilter(List fileFilters)
Constructs a new instance of AndFileFilter
with the specified list of filters.
| |
AndFileFilter(IOFileFilter filter1, IOFileFilter filter2)
Constructs a new file filter that ANDs 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.
|
AndFileFilter
.
Since: Commons IO 1.1
AndFileFilter
with the specified list of filters.
Parameters: fileFilters a List of IOFileFilter instances, 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