futils
Class WildFilter
java.lang.Object
futils.WildFilter
- All Implemented Interfaces:
- java.io.FileFilter
public class WildFilter
- extends java.lang.Object
- implements java.io.FileFilter
Constructor Summary |
WildFilter(java.lang.String suffix)
Accept only those File instances that
are of type file (i.e. |
WildFilter(java.lang.String prefix,
java.lang.String suffix)
Accept from the interface FilenameFilter will return
true if the file name begins with the prefix and ends with the
suffix. |
WildFilter(java.lang.String prefix,
java.lang.String midfix,
java.lang.String suffix)
Accept from the interface FilenameFilter will return
true if the file name begins with the prefix and ends with the
suffix. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WildFilter
public WildFilter(java.lang.String suffix)
- Accept only those
File
instances that
are of type file (i.e. not directory) and end with the
suffix
- Parameters:
suffix
- a string that all file names must end with.
WildFilter
public WildFilter(java.lang.String prefix,
java.lang.String suffix)
- Accept from the interface
FilenameFilter
will return
true if the file name begins with the prefix and ends with the
suffix.
Like:
dir f*.java
This returns only those files that start with "f" and end with ".java"
- Parameters:
prefix
- string passed in to describe the file names beginningsuffix
- ending part of the file name.
WildFilter
public WildFilter(java.lang.String prefix,
java.lang.String midfix,
java.lang.String suffix)
- Accept from the interface
FilenameFilter
will return
true if the file name begins with the prefix and ends with the
suffix.
Like:
dir f*.java
This returns only those files that start with "f" and end with ".java"
The midfix has to be contained in the filename in order for this to return true;
- Parameters:
prefix
- string passed in to describe the file names beginningsuffix
- ending part of the file name.midfix
- contained in the file name.
accept
public boolean accept(java.io.File dir)
- Specified by:
accept
in interface java.io.FileFilter
getFileNameFilter
public java.io.FilenameFilter getFileNameFilter()