public class WildcardOSFilter
extends org.apache.commons.io.filefilter.AbstractFileFilter
Constructor and Description |
---|
WildcardOSFilter(java.util.List<java.lang.String> wc)
Constructor for a list of wildcards.
|
WildcardOSFilter(java.lang.String wc)
Constructor for a single wildcard.
|
Modifier and Type | Method and Description |
---|---|
boolean |
accept(java.io.File file)
Checks to see if the filename matches one of the wildcards.
|
boolean |
accept(java.io.File dir,
java.lang.String name)
Checks to see if the filename matches one of the wildcards.
|
java.util.List<java.lang.String> |
getWildcards()
Returns list of filters that were set.
|
public WildcardOSFilter(java.lang.String wc)
wc
- a single filter to setpublic WildcardOSFilter(java.util.List<java.lang.String> wc)
wc
- a list of filters to setjava.lang.NullPointerException
- if the pattern list is null.public java.util.List<java.lang.String> getWildcards()
public boolean accept(java.io.File file)
accept
in interface java.io.FileFilter
accept
in interface org.apache.commons.io.filefilter.IOFileFilter
accept
in class org.apache.commons.io.filefilter.AbstractFileFilter
file
- the file to check.java.lang.NullPointerException
- if the file is null.public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.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 checkjava.lang.NullPointerException
- if the file is nullCopyright © 2010-2018 Planetary Data System. All Rights Reserved.