cynosurex.io
Class PrefixFilenameFilter
java.lang.Object
cynosurex.io.PrefixFilenameFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
public class PrefixFilenameFilter
- extends java.lang.Object
- implements java.io.FilenameFilter
This FilenameFilter allows the matching of files with a
certain prefix.
- Version:
- 1.0
- Author:
- Chieh Cheng
Field Summary |
protected boolean |
matchCase
|
protected java.lang.String |
prefix
|
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 |
prefix
protected java.lang.String prefix
matchCase
protected boolean matchCase
PrefixFilenameFilter
public PrefixFilenameFilter(java.lang.String prefix,
boolean matchCase)
- Constructor.
- Parameters:
prefix
- The prefix 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.