Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  FileFilter, FilenameFilter, Serializable, IOFileFilter

    public class NotFileFilter

extends AbstractFileFilter
implements Serializable

This filter produces a logical NOT of the filters specified.

Since:
  Commons IO 1.0
Version:
  $Revision: 1005099 $ $Date: 2010-10-06 17:13:01 +0100 (Wed, 06 Oct 2010) $
Author:
  Stephen Colebourne
See Also:
  `FileFilterUtils.notFileFilter(IOFileFilter)`, Serialized Form

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

Method Summary
`boolean` | `accept(File file)` Returns the logical NOT of the underlying filter's return value for the same File.
`boolean` | `accept(File file, String name)` Returns the logical NOT of the underlying filter's return value for the same arguments.
`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`

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:
    `IllegalArgumentException` - if the filter is null

Method Detail

### accept

    public boolean accept(File file)

  Returns the logical NOT of the underlying filter's return value for the same File.

  Specified by:
    `accept` in interface `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(File file,
                          String name)

  Returns the logical NOT of the underlying filter's return value for the same arguments.

  Specified by:
    `accept` in interface `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 String toString()

  Provide a String representaion of this file filter.

  Overrides:
    `toString` in class `AbstractFileFilter`
  Returns:
    a String representaion

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.