Class NotFileFilter

java.lang.Object
org.apache.commons.vfs2.filter.NotFileFilter
All Implemented Interfaces:
Serializable, FileFilter

public class NotFileFilter extends Object implements FileFilter, Serializable
This filter produces a logical NOT of the filters specified.
Since:
2.4
See Also:
  • Field Details

  • Constructor Details

    • NotFileFilter

      public NotFileFilter(FileFilter filter)
      Constructs a new file filter that NOTs the result of another filter.
      Parameters:
      filter - the filter, must not be null
  • Method Details

    • accept

      public boolean accept(FileSelectInfo fileSelectInfo) throws FileSystemException
      Returns the logical NOT of the underlying filter's return value for the same File.
      Specified by:
      accept in interface FileFilter
      Parameters:
      fileSelectInfo - the File to check
      Returns:
      true if the filter returns false
      Throws:
      FileSystemException - Thrown for file system errors.
    • toString

      public String toString()
      Provide a String representation of this file filter.
      Overrides:
      toString in class Object
      Returns:
      a String representation