Package org.apache.commons.io.filefilter

# Class FalseFileFilter

java.lang.Object
org.apache.commons.io.filefilter.FalseFileFilter

All Implemented Interfaces:
  `FileFilter`, `FilenameFilter`, `Serializable`, `PathMatcher`, `PathFilter`, `IOFileFilter`

public class FalseFileFilter extends Object implements IOFileFilter, Serializable
A file filter that always returns false.

## Deprecating Serialization

Serialization is deprecated and will be removed in 3.0.

Since:
  1.0
See Also:
  - `FileFilterUtils.falseFileFilter()`
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final IOFileFilter`
  `FALSE`
  Singleton instance of false filter.
  `static final IOFileFilter`
  `INSTANCE`
  Singleton instance of false filter.

  ### Fields inherited from interface org.apache.commons.io.filefilter.IOFileFilter

  `EMPTY_STRING_ARRAY`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `FalseFileFilter()`
  Restrictive constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `accept(File file)`
  Returns false.
  `boolean`
  `accept(File dir, String name)`
  Returns false.
  `FileVisitResult`
  `accept(Path file, BasicFileAttributes attributes)`
  Returns false.
  `IOFileFilter`
  `and(IOFileFilter fileFilter)`
  Constructs a new "and" filter with this filter.
  `IOFileFilter`
  `negate()`
  Constructs a new "not" filter with this filter.
  `IOFileFilter`
  `or(IOFileFilter fileFilter)`
  Constructs a new "or" filter with this filter.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface org.apache.commons.io.filefilter.IOFileFilter

  `matches`

- ## Field Details

  - ### 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

  - ### accept

    public FileVisitResult accept(Path file, BasicFileAttributes attributes)
    Returns false.
    Specified by:
      `accept` in interface `IOFileFilter`
    Specified by:
      `accept` in interface `PathFilter`
    Parameters:
      `file` - the file to check (ignored)
      `attributes` - the file's basic attributes (TODO may be null).
    Returns:
      false
    Since:
      2.9.0

  - ### and

    public IOFileFilter and(IOFileFilter fileFilter)
    Description copied from interface: `IOFileFilter`
    Constructs a new "and" filter with this filter.
    Specified by:
      `and` in interface `IOFileFilter`
    Parameters:
      `fileFilter` - the filter to "and".
    Returns:
      a new filter.

  - ### negate

    public IOFileFilter negate()
    Description copied from interface: `IOFileFilter`
    Constructs a new "not" filter with this filter.
    Specified by:
      `negate` in interface `IOFileFilter`
    Returns:
      a new filter.

  - ### or

    public IOFileFilter or(IOFileFilter fileFilter)
    Description copied from interface: `IOFileFilter`
    Constructs a new "or" filter with this filter.
    Specified by:
      `or` in interface `IOFileFilter`
    Parameters:
      `fileFilter` - the filter to "or".
    Returns:
      a new filter.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`