Class FileUtil.NameFileFilter

  • All Implemented Interfaces:
    java.io.FileFilter
    Enclosing class:
    FileUtil

    public static class FileUtil.NameFileFilter
    extends java.lang.Object
    implements java.io.FileFilter
    The NameFileFilter class allows to filter files based on specified file name.
    • Constructor Summary

      Constructors 
      Constructor Description
      NameFileFilter​(java.lang.String fileName)
      Constructs NameFileFilter object for a given file name.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.io.File file)  
      • Methods inherited from class java.lang.Object

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

      • NameFileFilter

        public NameFileFilter​(java.lang.String fileName)
        Constructs NameFileFilter object for a given file name.
        Parameters:
        fileName - The given file name for filtering.
    • Method Detail

      • accept

        public boolean accept​(java.io.File file)
        Specified by:
        accept in interface java.io.FileFilter
        Parameters:
        file - The given file to be tested.
        Returns:
        true if the given file should be accepted, false otherwise.