public class FilePrefixFilter extends Object implements FileFilter
Modifier and Type | Field and Description |
---|---|
protected boolean |
ignoreCase
Flag to signal that we want to ignore the case.
|
protected String |
prefix
The prefix which files must have to be accepted.
|
Constructor and Description |
---|
FilePrefixFilter(String prefix)
Construct a case sensitive FilePrefixFilter.
|
FilePrefixFilter(String prefix,
boolean ignoreCase)
Construct a FilePrefixFilter.
|
protected final String prefix
protected final boolean ignoreCase
public FilePrefixFilter(String prefix, boolean ignoreCase)
prefix
- The prefix which files must have to be accepted.ignoreCase
- True if the filter should be case-insensitive.public FilePrefixFilter(String prefix)
prefix
- The prefix which files must have to be accepted.public boolean accept(File file)
accept
in interface FileFilter
file
- The file to check.Copyright © 2018 JBoss by Red Hat. All rights reserved.