Class XMLFilenameFilter

java.lang.Object
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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The XML extension to be used for filtering the files.
    final String
    Deprecated.
    will be made private in future releases
    final boolean
    Set to true to ignore the case of the extension.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new case-insensitive XML file filter.
    XMLFilenameFilter(boolean ignoreCase)
    Creates a new XML file filter.
  • Method Summary

    Modifier and Type
    Method
    Description
    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

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_EXTENSION

      public static final String DEFAULT_EXTENSION
      The XML extension to be used for filtering the files.
      See Also:
    • 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:
    • ignoreCase

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

    • 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 Details

    • 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.