Class FalseFileFilter

java.lang.Object
org.apache.commons.io.filefilter.FalseFileFilter
All Implemented Interfaces:
FileFilter, FilenameFilter, Serializable, IOFileFilter

public class FalseFileFilter extends Object implements IOFileFilter, Serializable
A file filter that always returns false.
Since:
1.0
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • FALSE

      public static final IOFileFilter FALSE
      Singleton instance of false filter.
      Since:
      1.3
    • INSTANCE

      public static final IOFileFilter INSTANCE
      Singleton instance of false filter. Please use the identical FalseFileFilter.FALSE constant. The new name is more JDK 1.5 friendly as it doesn't clash with other values when using static imports.
  • Constructor Details

    • FalseFileFilter

      protected FalseFileFilter()
      Restrictive constructor.
  • Method Details

    • accept

      public boolean accept(File file)
      Returns false.
      Specified by:
      accept in interface FileFilter
      Specified by:
      accept in interface IOFileFilter
      Parameters:
      file - the file to check (ignored)
      Returns:
      false
    • accept

      public boolean accept(File dir, String name)
      Returns false.
      Specified by:
      accept in interface FilenameFilter
      Specified by:
      accept in interface IOFileFilter
      Parameters:
      dir - the directory to check (ignored)
      name - the file name (ignored)
      Returns:
      false