Class SuffixFilter

  • All Implemented Interfaces:
    Filter

    public class SuffixFilter
    extends java.lang.Object
    implements Filter
    A file filter based on its suffix
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String suffixFilter  
    • Constructor Summary

      Constructors 
      Constructor Description
      SuffixFilter​(java.lang.String suffixFilter)  
    • Method Summary

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

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

      • suffixFilter

        private java.lang.String suffixFilter
    • Constructor Detail

      • SuffixFilter

        public SuffixFilter​(java.lang.String suffixFilter)
        Parameters:
        suffixFilter - the suffix which will be matched for every file, must not be null
    • Method Detail

      • filter

        public boolean filter​(java.io.File file)
        Specified by:
        filter in interface Filter
        Parameters:
        file - the file to filter
        Returns:
        true if the file ends with the specified suffix, otherwise false