org.im4java.utils
Class RegexFilter
java.lang.Object
org.im4java.utils.BaseFilter
org.im4java.utils.RegexFilter
- All Implemented Interfaces:
- java.io.FilenameFilter
public class RegexFilter
- extends BaseFilter
This utility-class implements a FilenameFilter based on regular expressions.
- Since:
- 1.1.0
- Version:
- $Revision: 1.2 $
- Author:
- $Author: bablokb $
Constructor Summary |
RegexFilter(java.lang.String pPattern)
Construct the filter using the given pattern. |
RegexFilter(java.lang.String pPattern,
int pFlags)
Construct the filter using the given pattern and match-flags |
Method Summary |
boolean |
accept(java.io.File dir,
java.lang.String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RegexFilter
public RegexFilter(java.lang.String pPattern)
throws java.util.regex.PatternSyntaxException
- Construct the filter using the given pattern.
- Parameters:
pPattern
- the regular expression to use during filtering
- Throws:
java.util.regex.PatternSyntaxException
RegexFilter
public RegexFilter(java.lang.String pPattern,
int pFlags)
throws java.util.regex.PatternSyntaxException,
java.lang.IllegalArgumentException
- Construct the filter using the given pattern and match-flags
- Parameters:
pPattern
- the regular expression to use during filteringpFlags
- the match-flags,
see Pattern.Pattern(String,int)
- Throws:
java.util.regex.PatternSyntaxException
java.lang.IllegalArgumentException
accept
public boolean accept(java.io.File dir,
java.lang.String name)
-
Released under the LGPL, (c) Bernhard Bablok 2008-2010
Homepage: http://im4java.sourceforge.net/