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

Class NotFilenameFilter

  • All Implemented Interfaces:
    java.io.FilenameFilter


    public class NotFilenameFilter
    extends java.lang.Object
    implements java.io.FilenameFilter
    NotFilenameFilter is a FilenameFilter that wraps another FilenameFilter 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 do not start with the letter "A".
     NotFilenameFilter filter = new NotFilenameFilter (new RegexFilenameFilter ("^[Aa]", FileFilterMatchType.NAME));
     
    See Also:
    FilenameFilter, AndFilenameFilter, OrFilenameFilter
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      boolean accept(java.io.File dir, java.lang.String name)
      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

      • NotFilenameFilter

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

      • accept

        public boolean accept(java.io.File dir,
                              java.lang.String name)
        Tests whether a file should be included in a file list.
        Specified by:
        accept in interface java.io.FilenameFilter
        Parameters:
        dir - The directory containing the file.
        name - the file name
        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.