vn
Class Inspector.MyFilter
java.lang.Object
vn.Inspector.MyFilter
- All Implemented Interfaces:
- FileFilter
- Enclosing class:
- Inspector
private static class Inspector.MyFilter
- extends Object
- implements FileFilter
Decides which files to select for the File.listFiles()
method of the File
class.
- See Also:
Inspector.analyzeArguments(String[])
Field Summary |
private String |
ext
The extension of the files to select. |
Constructor Summary |
Inspector.MyFilter(String newExt)
Constructs this filter with the given extension on which to filter. |
Method Summary |
boolean |
accept(File pathName)
Returns whether or not to accept the given file based on this filter. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ext
private String ext
- The extension of the files to select.
Inspector.MyFilter
public Inspector.MyFilter(String newExt)
- Constructs this filter with the given extension on which to filter.
- Parameters:
newExt
- the extension of the files to select (i.e. "xml")
accept
public boolean accept(File pathName)
- Returns whether or not to accept the given file based on this filter.
- Specified by:
accept
in interface FileFilter
- Parameters:
pathName
- the path which should be accepted or rejected
based on whether it contains the extension for this
Inspector.MyFilter
object
- Returns:
true
if the given file should be selected