|
JAPI 0.9.0 Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.filechooser.FileFilter net.sf.japi.util.filter.file.AbstractFileFilter net.sf.japi.util.filter.file.RegexFileFilter
public class RegexFileFilter
A FileFilter implementation that matches against a regular expression.
Pattern
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface net.sf.japi.util.filter.Filter |
---|
Filter.Factory |
Constructor Summary | |
---|---|
RegexFileFilter(Pattern... patterns)
Create a RegexFileFilter. |
|
RegexFileFilter(String... patterns)
Create a RegexFileFilter. |
Method Summary | |
---|---|
boolean |
accept(File pathname)
Whether the given file is accepted by this filter. |
String |
getDescription()
The description of this filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexFileFilter(String... patterns)
patterns
- String of Pattern to match againstMatcher.matches()
, which means the whole filename (but excluding path) is matched.public RegexFileFilter(Pattern... patterns)
patterns
- Patterns to match againstMatcher.matches()
, which means the whole filename (but excluding path) is matched.Method Detail |
---|
public boolean accept(File pathname)
accept
in interface FileFilter
accept
in interface Filter<File>
accept
in class FileFilter
pathname
- The abstract pathname to be tested
true
if and only if pathname
should be includedpublic String getDescription()
getDescription
in class FileFilter
FileView.getName(java.io.File)
|
JAPI Yet another Java API API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |