|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.clapper.util.io.AndFileFilter
public final class AndFileFilter
An AndFileFilter contains logically ANDs other
java.io.FileFilter objects. When its accept()
method is called, the AndFileFilter object passes the file
through the contained filters. The file is only accepted if it is
accepted by all contained filters. This class conceptually provides a
logical "AND" operator for file filters.
The contained filters are applied in the order they were added to the
AndFileFilter object. This class's accept()
method stops looping over the contained filters as soon as it encounters
one whose accept() method returns false (implementing
a "short-circuited AND" operation.)
FileFilter,
OrFileFilter,
NotFileFilter,
AndFilenameFilter,
RegexFileFilter| Constructor Summary | |
|---|---|
AndFileFilter()
Construct a new AndFileFilter with no contained filters. |
|
AndFileFilter(java.io.FileFilter... filters)
Construct a new AndFileFilter with a set of contained filters. |
|
| Method Summary | |
|---|---|
boolean |
accept(java.io.File file)
Determine whether a file is to be accepted or not, based on the contained filters. |
AndFileFilter |
addFilter(java.io.FileFilter filter)
Add a filter to the set of contained filters. |
void |
removeFilter(java.io.FileFilter filter)
Remove a filter from the set of contained filters. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AndFileFilter()
public AndFileFilter(java.io.FileFilter... filters)
addFilter() method.
filters - filters to add| Method Detail |
|---|
public AndFileFilter addFilter(java.io.FileFilter filter)
filter - the FileFilter to add.
removeFilter(java.io.FileFilter)public void removeFilter(java.io.FileFilter filter)
filter - the FileFilter to remove.addFilter(java.io.FileFilter)public boolean accept(java.io.File file)
If the set of contained filters is empty, then this method returns true.
accept in interface java.io.FileFilterfile - The file to check for acceptance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||