xmlBlaster 2.1.0 API

org.xmlBlaster.contrib.filewatcher
Class FilenameFilter

java.lang.Object
  extended by org.xmlBlaster.contrib.filewatcher.FilenameFilter
All Implemented Interfaces:
java.io.FileFilter

public class FilenameFilter
extends java.lang.Object
implements java.io.FileFilter

FilenameFilter. This code is based on the BasicFileChooserUI swing code. The difference is that id returns false if the found file is a directory.

Author:
Michele Laghi

Field Summary
private  java.lang.String pattern
           
private  gnu.regexp.RE regex
           
 
Constructor Summary
FilenameFilter()
           
FilenameFilter(java.lang.String pattern, boolean trueRegex)
           
 
Method Summary
 boolean accept(java.io.File f)
           
 java.lang.String getPattern()
           
 void setPattern(java.lang.String globPattern, boolean trueRegex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

regex

private gnu.regexp.RE regex

pattern

private java.lang.String pattern
Constructor Detail

FilenameFilter

public FilenameFilter()

FilenameFilter

public FilenameFilter(java.lang.String pattern,
                      boolean trueRegex)
               throws XmlBlasterException
Throws:
XmlBlasterException
Method Detail

setPattern

public void setPattern(java.lang.String globPattern,
                       boolean trueRegex)
                throws XmlBlasterException
Throws:
XmlBlasterException

accept

public boolean accept(java.io.File f)
Specified by:
accept in interface java.io.FileFilter
See Also:
FileFilter.accept(java.io.File)

getPattern

public java.lang.String getPattern()
Returns:
Returns the pattern.

xmlBlaster 2.1.0 API

Copyright © 1999-2011 The xmlBlaster.org contributers.