Documentation of 'org.clapper.util.io.NotFileFilter' Java class
NotFileFilter
org.clapper.util.io

Class NotFileFilter

  • All Implemented Interfaces:
    java.io.FileFilter


    public class NotFileFilter
    extends java.lang.Object
    implements java.io.FileFilter
    NotFileFilter is a FileFilter that wraps another FileFilter and negates the sense of the wrapped filter's accept() method. This class conceptually provides a logical "NOT" operator for file filters. For example, the following code fragment will create a filter that finds all files that are not directories.
     NotFileFilter filter = new NotFileFilter (new DirectoryFilter());
     
    See Also:
    FileFilter, AndFileFilter, OrFileFilter, DirectoryFilter
    • Constructor Summary

      Constructors 
      Constructor and Description
      NotFileFilter(java.io.FileFilter filter)
      Create a new NotFileFilter that wraps the specified FileFilter.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean accept(java.io.File file)
      Tests whether a file should be included in a file list.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NotFileFilter

        public NotFileFilter(java.io.FileFilter filter)
        Create a new NotFileFilter that wraps the specified FileFilter.
        Parameters:
        filter - The FileFilter to wrap.
    • Method Detail

      • accept

        public boolean accept(java.io.File file)
        Tests whether a file should be included in a file list.
        Specified by:
        accept in interface java.io.FileFilter
        Parameters:
        file - The file to check for acceptance
        Returns:
        true if the file matches, false if it doesn't

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.