cynosurex.io
Class SuffixFilenameFilter
java.lang.Object
cynosurex.io.SuffixFilenameFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
public class SuffixFilenameFilter
- extends java.lang.Object
- implements java.io.FilenameFilter
This FilenameFilter allows the matching of files with a
certain suffix.
- Version:
- 1.0
- Author:
- Chieh Cheng
Field Summary |
protected boolean |
matchCase
|
protected java.lang.String |
suffix
|
Method Summary |
boolean |
accept(java.io.File dir,
java.lang.String filename)
This method called by the File object to determine
whether to accept a filename. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
suffix
protected java.lang.String suffix
matchCase
protected boolean matchCase
SuffixFilenameFilter
public SuffixFilenameFilter(java.lang.String suffix,
boolean matchCase)
- Constructor.
- Parameters:
suffix
- The suffix to match.matchCase
- Whether this filter is case-sensitive.
accept
public boolean accept(java.io.File dir,
java.lang.String filename)
- This method called by the File object to determine
whether to accept a filename.
- Specified by:
accept
in interface java.io.FilenameFilter
- Parameters:
dir
- The directory where the file is located.filename
- The name of the file.