public class NameFilter extends Object implements FileFilter
| Modifier and Type | Field and Description |
|---|---|
private boolean |
dodirs
If true, we accept dirs even if name does not match.
|
private String |
name
The name pattern consists of '*', '?', and regular chars.
|
| Constructor and Description |
|---|
NameFilter(String n)
Construct a new file name filter, specifiying patterns for the
file name and the extension.
|
NameFilter(String n,
boolean dirs)
Construct a new file name filter, specifiying patterns for the
file name and the extension.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(File c)
Takes the file name and the file extension and matches it against
the patterns.
|
private String name
private final boolean dodirs
public NameFilter(String n)
public NameFilter(String n, boolean dirs)
public boolean accept(File c)
accept in interface FileFilter