public class WildcardOSFilter
extends org.apache.commons.io.filefilter.AbstractFileFilter
Constructor and Description |
---|
WildcardOSFilter(List wc)
Constructor for a list of wildcards
|
WildcardOSFilter(String wc)
Constructor for a single wildcard
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(File file)
Checks to see if the filename matches one of the wildcards.
|
boolean |
accept(File dir,
String name)
Checks to see if the filename matches one of the wildcards.
|
List |
getWildcards()
Returns list of filters that were set
|
public WildcardOSFilter(String wc)
wc
- a single filter to setNullPointerException
- if the pattern is nullpublic WildcardOSFilter(List wc)
wc
- a list of filters to setNullPointerException
- if the pattern list is nullpublic List getWildcards()
public boolean accept(File file)
accept
in interface FileFilter
accept
in interface org.apache.commons.io.filefilter.IOFileFilter
accept
in class org.apache.commons.io.filefilter.AbstractFileFilter
file
- the file to checkNullPointerException
- if the file is nullpublic boolean accept(File dir, String name)
accept
in interface FilenameFilter
accept
in interface org.apache.commons.io.filefilter.IOFileFilter
accept
in class org.apache.commons.io.filefilter.AbstractFileFilter
dir
- the directory to checkname
- the file name within the directory to checkNullPointerException
- if the file is nullCopyright © 2010–2016 Planetary Data System. All rights reserved.