gshute.ioutil
Class SuffixFilter
java.lang.Object
|
+--gshute.ioutil.SuffixFilter
- public class SuffixFilter
- extends java.lang.Object
- implements java.io.FilenameFilter
A SuffixFilter is a FilenameFilter that accepts file names based on a
suffix.
Field Summary |
protected java.lang.String |
suffix
suffix is the suffix for this suffix filter, including the period
at the beginning of the suffix. |
Constructor Summary |
SuffixFilter(java.lang.String sfx)
new SuffixFilter(sfx) returns a FilenameFilter that accepts files
whose name ends with "." + sfx. |
Method Summary |
boolean |
accept(java.io.File dir,
java.lang.String name)
sf.accept(dir, name) returns true if name ends with the suffix
established in the constructor for sf. |
java.lang.String |
toString()
sf.toString() returns a string describing sf. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
suffix
protected java.lang.String suffix
- suffix is the suffix for this suffix filter, including the period
at the beginning of the suffix.
SuffixFilter
public SuffixFilter(java.lang.String sfx)
- new SuffixFilter(sfx) returns a FilenameFilter that accepts files
whose name ends with "." + sfx.
accept
public boolean accept(java.io.File dir,
java.lang.String name)
- sf.accept(dir, name) returns true if name ends with the suffix
established in the constructor for sf.
- Specified by:
- accept in interface java.io.FilenameFilter
toString
public java.lang.String toString()
- sf.toString() returns a string describing sf.
- Overrides:
- toString in class java.lang.Object