Class RegexFileFilter

    • Constructor Detail

      • RegexFileFilter

        public RegexFileFilter​(String aPattern)
        Constructor for a regular expression FilenameFilter.
        Parameters:
        aPattern - The regular expression for the filter
      • RegexFileFilter

        public RegexFileFilter​(String aPattern,
                               boolean aCaseInsensitivePattern)
        Constructor for a regular expression FilenameFilter that creates a case insensitive.
        Parameters:
        aPattern - The regular expression for the filter
        aCaseInsensitivePattern - A case insensitive regular expression pattern
    • Method Detail

      • accept

        public boolean accept​(File aDir,
                              String aFilename)
        Determines whether the supplied File in the supplied directory should be included.
        Specified by:
        accept in interface FilenameFilter
        Parameters:
        aDir - The directory in which the File of the file name lives
        aFilename - A File name to compare against the regular expression; it must be a file (not a directory)
      • toString

        public String toString()
        Returns a string version of the regular expression used as a filter.
        Overrides:
        toString in class Object