NotFileFilter (Commons IO 2.5)
Date: 2016-12-01

org.apache.commons.io.filefilter

## Class NotFileFilter

- java.lang.Object
- - org.apache.commons.io.filefilter.AbstractFileFilter
  - - org.apache.commons.io.filefilter.NotFileFilter

- All Implemented Interfaces:
    java.io.FileFilter, java.io.FilenameFilter, java.io.Serializable, IOFileFilter

      public class NotFileFilter
      extends AbstractFileFilter
      implements java.io.Serializable

  This filter produces a logical NOT of the filters specified.
  Since:
    1.0
  Version:
    $Id: NotFileFilter.java 1642757 2014-12-01 21:09:30Z sebb $
  See Also:
    `FileFilterUtils.notFileFilter(IOFileFilter)`, Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private IOFileFilter` | `filter` The filter
    `private static long` | `serialVersionUID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NotFileFilter(IOFileFilter filter)` Constructs a new file filter that NOTs the result of another filter.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(java.io.File file)` Returns the logical NOT of the underlying filter's return value for the same File.
    `boolean` | `accept(java.io.File file, java.lang.String name)` Returns the logical NOT of the underlying filter's return value for the same arguments.
    `java.lang.String` | `toString()` Provide a String representaion of this file filter.

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

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

- - ### Field Detail

    - #### serialVersionUID

          private static final long serialVersionUID

      See Also:
        Constant Field Values

    - #### filter

          private final IOFileFilter filter

      The filter

  - ### Constructor Detail

    - #### NotFileFilter

          public NotFileFilter(IOFileFilter filter)

      Constructs a new file filter that NOTs the result of another filter.
      Parameters:
        `filter` - the filter, must not be null
      Throws:
        `java.lang.IllegalArgumentException` - if the filter is null

  - ### Method Detail

    - #### accept

          public boolean accept(java.io.File file)

      Returns the logical NOT of the underlying filter's return value for the same File.
      Specified by:
        `accept` in interface `java.io.FileFilter`
      Specified by:
        `accept` in interface `IOFileFilter`
      Overrides:
        `accept` in class `AbstractFileFilter`
      Parameters:
        `file` - the File to check
      Returns:
        true if the filter returns false

    - #### accept

          public boolean accept(java.io.File file,
                       java.lang.String name)

      Returns the logical NOT of the underlying filter's return value for the same arguments.
      Specified by:
        `accept` in interface `java.io.FilenameFilter`
      Specified by:
        `accept` in interface `IOFileFilter`
      Overrides:
        `accept` in class `AbstractFileFilter`
      Parameters:
        `file` - the File directory
        `name` - the filename
      Returns:
        true if the filter returns false

    - #### toString

          public java.lang.String toString()

      Provide a String representaion of this file filter.
      Overrides:
        `toString` in class `AbstractFileFilter`
      Returns:
        a String representaion

Copyright (c) 2002-2016 Apache Software Foundation