java.io.FileFilter providing conditional AND logic across a list of
file filters. This filter returns 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.
| Modifier and Type | Field and Description |
|---|---|
| private List | fileFilters
The list of file filters. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | AndFileFilter(final List<E>
a List of IOFileFilter instances, copied, null ignored fileFilters)Constructs a new instance of |
| public | AndFileFilter(IOFileFilter
the first filter, must not be null filter1, IOFileFilter the second filter, must not be null filter2)Constructs a new file filter that ANDs the result of two other filters. |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | accept(final File
the File to check file)Overrides org. Implements org. |
| public boolean | accept(final File
the directory File to check file, final String the filename within the directory to check name)Overrides org. Implements org. |
| public void | addFileFilter(final IOFileFilter
the filter to be added ioFileFilter)Implements org. |
| public List | getFileFilters()
Implements org. |
| public boolean | removeFileFilter(final IOFileFilter
filter to be removed ioFileFilter)Implements org. |
| public void | setFileFilters(final List<E>
the list of filters fileFilters)Implements org. |
| fileFilters | back to summary |
|---|---|
| private List<E> fileFilters The list of file filters. | |
| AndFileFilter | back to summary |
|---|---|
| public AndFileFilter() Constructs a new instance of
| |
| AndFileFilter | back to summary |
|---|---|
| public AndFileFilter(final List<E> fileFilters) Constructs a new instance of
| |
| AndFileFilter | back to summary |
|---|---|
| public AndFileFilter(IOFileFilter filter1, IOFileFilter filter2) Constructs a new file filter that ANDs the result of two other filters.
| |
| accept | back to summary |
|---|---|
| public boolean accept(final File file) Overrides org. Implements org. Doc from org. Checks to see if the File should be accepted by this filter.
| |
| accept | back to summary |
|---|---|
| public boolean accept(final File file, final String name) Overrides org. Implements org. Doc from org. Checks to see if the File should be accepted by this filter. | |
| addFileFilter | back to summary |
|---|---|
| public void addFileFilter(final IOFileFilter ioFileFilter) Implements org. Doc from org. Adds the specified file filter to the list of file filters at the end of the list.
| |
| getFileFilters | back to summary |
|---|---|
| public List Implements org. Doc from org. Returns this conditional file filter's list of file filters.
| |
| removeFileFilter | back to summary |
|---|---|
| public boolean removeFileFilter(final IOFileFilter ioFileFilter) Implements org. Doc from org. Removes the specified file filter.
| |
| setFileFilters | back to summary |
|---|---|
| public void setFileFilters(final List<E> fileFilters) Implements org. Doc from org. Sets the list of file filters, replacing any previously configured file filters on this filter.
| |