com.topologi.diffx.util
Class XMLFilenameFilter

java.lang.Object
  extended by com.topologi.diffx.util.XMLFilenameFilter
All Implemented Interfaces:
FileFilter

public final class XMLFilenameFilter
extends Object
implements FileFilter

Filename filter for XML files.

This filter assumes that an file simply as the .xml file extension.

Version:
4 April 2005
Author:
Christophe Lauret

Field Summary
static String DEFAULT_EXTENSION
          The XML extension to be used for filtering the files.
 String ext
          Deprecated. will be made private in future releases
 boolean ignoreCase
          Set to true to ignore the case of the extension.
 
Constructor Summary
XMLFilenameFilter()
          Creates a new case-insensitive XML file filter.
XMLFilenameFilter(boolean ignoreCase)
          Creates a new XML file filter.
 
Method Summary
 boolean accept(File pathname)
          Tests whether or not the specified abstract pathname should be included in a pathname list.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_EXTENSION

public static final String DEFAULT_EXTENSION
The XML extension to be used for filtering the files.

See Also:
Constant Field Values

ext

@Deprecated
public final String ext
Deprecated. will be made private in future releases
The XML extension to be used for filtering the files.

See Also:
Constant Field Values

ignoreCase

public final boolean ignoreCase
Set to true to ignore the case of the extension.

Constructor Detail

XMLFilenameFilter

public XMLFilenameFilter()
Creates a new case-insensitive XML file filter.


XMLFilenameFilter

public XMLFilenameFilter(boolean ignoreCase)
Creates a new XML file filter.

Parameters:
ignoreCase - true to ignore the case of the extension.
Method Detail

accept

public boolean accept(File pathname)
               throws NullPointerException
Tests whether or not the specified abstract pathname should be included in a pathname list.

A file is accepted if its name has a file extension matching the "xml".

Specified by:
accept in interface FileFilter
Parameters:
pathname - The abstract pathname to be tested;
Returns:
true if and only if pathname has an extension matching "xml".
Throws:
NullPointerException - If the path name is null.