public class FilenameExtensionFilter extends FileFilter implements FilenameFilter
Constructor and Description |
---|
FilenameExtensionFilter(String aExtension)
This constructor takes an extension to filter on.
|
FilenameExtensionFilter(String aExtension,
String aDescription)
This constructor takes an extension to filter on.
|
public FilenameExtensionFilter(String aExtension)
aExtension
- String with the extension to filter. Note that
'.class' is identical to 'class'.public FilenameExtensionFilter(String aExtension, String aDescription)
aExtension
- String with the extension to filter. Note that
'.class' is identical to 'class'.aDescription
- String with the description for the FileFilter.
Can be null in which case the description will be an empty String.public boolean accept(File dir, String name)
accept
in interface FilenameFilter
dir
- the directory in which the file was found.name
- the name of the file.true
if and only if the name should be
included in the file list; false
otherwise.public boolean accept(File f)
accept
in class FileFilter
public String getDescription()
getDescription
in class FileFilter
Copyright © 2014. All rights reserved.