org.apache.commons.io.filefilter
public class AndFileFilter extends AbstractFileFilter implements ConditionalFileFilter
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: 490425 $ $Date: 2006-12-27 02:25:43 +0100 (Mi, 27 Dez 2006) $
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)
{@inheritDoc} |
boolean | accept(File file, String name)
{@inheritDoc} |
void | addFileFilter(IOFileFilter ioFileFilter)
{@inheritDoc} |
List | getFileFilters()
{@inheritDoc} |
boolean | removeFileFilter(IOFileFilter ioFileFilter)
{@inheritDoc} |
void | setFileFilters(List fileFilters)
{@inheritDoc} |
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