|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.filter.MultiFilter
public final class MultiFilter
Used to combine filters. Automatically filters out all directories, and/or files.
Field Summary | |
---|---|
static int |
BOTH
code for requesting both files and directories. |
static boolean |
DEBUGGING
true if debugging. |
static int |
DIRS
code for requesting directories only |
static int |
FILES
Code for requesting files only. |
Constructor Summary | |
---|---|
MultiFilter(int want)
constructor |
Method Summary | |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String name)
Select only files with that pass muster |
void |
addConsider(java.io.FilenameFilter consider)
Add a FilenameFilter describing files you want to consider. |
void |
addMust(java.io.FilenameFilter must)
Add a FilenameFilter describing the conditions that all files must pass. |
void |
addNever(java.io.FilenameFilter never)
Add a FilenameFilter describing the files you want to reject. |
static void |
main(java.lang.String[] args)
TEST harness |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUGGING
public static final int BOTH
public static final int DIRS
public static final int FILES
Constructor Detail |
---|
public MultiFilter(int want)
want
- What do you want returned FILES, DIRS or BOTH?Method Detail |
---|
public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.FilenameFilter
dir
- the directory in which the file was found.name
- the name of the file
public void addConsider(java.io.FilenameFilter consider)
consider
- FilenameFilter, one of mine or anyone else's to consider in the combination.public void addMust(java.io.FilenameFilter must)
must
- FileFilter to add.public void addNever(java.io.FilenameFilter never)
never
- FilenameFilter to addpublic static void main(java.lang.String[] args)
args
- not used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |