Class NotFileFilter

  • All Implemented Interfaces:
    java.io.Serializable, FileFilter

    public class NotFileFilter
    extends java.lang.Object
    implements FileFilter, java.io.Serializable
    This filter produces a logical NOT of the filters specified.
    Since:
    2.4
    Author:
    This code was originally ported from Apache Commons IO File Filter
    See Also:
    "https://commons.apache.org/proper/commons-io/", Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      NotFileFilter​(FileFilter filter)
      Constructs a new file filter that NOTs the result of another filter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(FileSelectInfo fileSelectInfo)
      Returns the logical NOT of the underlying filter's return value for the same File.
      java.lang.String toString()
      Provide a String representation 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​(FileFilter filter)
        Constructs a new file filter that NOTs the result of another filter.
        Parameters:
        filter - the filter, must not be null
    • Method Detail

      • 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 java.lang.String toString()
        Provide a String representation of this file filter.
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String representation