|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.io.filefilter.AbstractFileFilter org.apache.commons.finder.filters.RegexFilter
public class RegexFilter
IOFileFilter
implementation that uses regular
expression matching on the file path.
Constructor Summary | |
---|---|
RegexFilter(java.lang.String regex,
boolean ignoreCase)
Construct a new IOFileFilter specifying the
regular expresion criteria. |
Method Summary | |
---|---|
boolean |
accept(java.io.File file)
Tests whether the File can
matches a specified regular expression. |
java.lang.String |
getRegex()
Returnt the regular expression. |
boolean |
isIgnoreCase()
Indicates whether the case should be ignored. |
java.lang.String |
toString()
Return a String representation of this class. |
Methods inherited from class org.apache.commons.io.filefilter.AbstractFileFilter |
---|
accept |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RegexFilter(java.lang.String regex, boolean ignoreCase)
IOFileFilter
specifying the
regular expresion criteria.
regex
- The regular expression.ignoreCase
- Whether the case should be ignored.Method Detail |
---|
public boolean isIgnoreCase()
true
if the case should be ignored,
otherwise false
public java.lang.String getRegex()
public boolean accept(java.io.File file)
File
can
matches a specified regular expression.
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 test.
true
if the File
matches the regular expression, otherwise
false
.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |