java.lang.Object
org.apache.oro.io.RegexFilenameFilter
- All Implemented Interfaces:
- java.io.FileFilter, java.io.FilenameFilter
- Direct Known Subclasses:
- AwkFilenameFilter, GlobFilenameFilter, Perl5FilenameFilter
- public abstract class RegexFilenameFilter
- extends java.lang.Object
- implements java.io.FilenameFilter, java.io.FileFilter
RegexFilenameFilter is the base class for a set of FilenameFilter
implementations that filter based on a regular expression.
- Since:
- 1.0
- Version:
- @version@
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_cache
org.apache.oro.text.PatternCache _cache
_matcher
org.apache.oro.text.regex.PatternMatcher _matcher
_pattern
org.apache.oro.text.regex.Pattern _pattern
RegexFilenameFilter
RegexFilenameFilter(org.apache.oro.text.PatternCache cache,
org.apache.oro.text.regex.PatternMatcher matcher,
java.lang.String regex)
RegexFilenameFilter
RegexFilenameFilter(org.apache.oro.text.PatternCache cache,
org.apache.oro.text.regex.PatternMatcher matcher,
java.lang.String regex,
int options)
RegexFilenameFilter
RegexFilenameFilter(org.apache.oro.text.PatternCache cache,
org.apache.oro.text.regex.PatternMatcher matcher)
setFilterExpression
public void setFilterExpression(java.lang.String regex)
throws org.apache.oro.text.MalformedCachePatternException
- Set the regular expression on which to filter.
setFilterExpression
public void setFilterExpression(java.lang.String regex,
int options)
throws org.apache.oro.text.MalformedCachePatternException
- Set the regular expression on which to filter along with any
special options to use when compiling the expression.
accept
public boolean accept(java.io.File dir,
java.lang.String filename)
- Filters a filename. Tests if the filename EXACTLY matches the pattern
contained by the filter. The directory argument is not examined.
Conforms to the java.io.FilenameFilter interface.
- Specified by:
accept in interface java.io.FilenameFilter
accept
public boolean accept(java.io.File pathname)
- Filters a filename. Tests if the filename EXACTLY matches the pattern
contained by the filter. The filename is defined as pathname.getName().
Conforms to the java.io.FileFilter interface.
- Specified by:
accept in interface java.io.FileFilter