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.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File f) |
boolean |
accept(File dir,
String name)
Tests if a specified file should be included in a file list.
|
String |
getDescription() |
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 FilenameFilterdir - 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 FileFilterpublic String getDescription()
getDescription in class FileFilterCopyright © 2016. All rights reserved.