java.io.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.
| Modifier and Type | Field and Description |
|---|---|
| private List | fileFilters
The list of file filters. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | OrFileFilter(final List<E>
the file filters for this filter, copied, null ignored fileFilters)Constructs a new instance of |
| public | OrFileFilter(IOFileFilter
the first filter, must not be null filter1, IOFileFilter the second filter, must not be null filter2)Constructs a new file filter that ORs 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(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. | |
| OrFileFilter | back to summary |
|---|---|
| public OrFileFilter() Constructs a new instance of
| |
| OrFileFilter | back to summary |
|---|---|
| public OrFileFilter(final List<E> fileFilters) Constructs a new instance of
| |
| OrFileFilter | back to summary |
|---|---|
| public OrFileFilter(IOFileFilter filter1, IOFileFilter filter2) Constructs a new file filter that ORs 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(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.
| |