Class ExtensionFilter

  • All Implemented Interfaces:
    java.io.FilenameFilter

    public class ExtensionFilter
    extends BaseFilter
    This utility-class implements a FilenameFilter based on extensions. The comparison ignores the case of the extension.
    Since:
    1.1.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ExtensionFilter RAW_IMAGES
      A filter for raw-image types (the list is taken from Wikipedia, see http://en.wikipedia.org/wiki/Raw_image_format).
      static ExtensionFilter STANDARD_IMAGES
      A filter for standard-image types (jpg, tif, png, gif and bmp).
    • Constructor Summary

      Constructors 
      Constructor Description
      ExtensionFilter​(java.lang.String... pExt)
      Constructor (pass the extensions as array or as String-arguments).
      ExtensionFilter​(java.util.Collection<java.lang.String> pExt)
      Constructor (pass the extensions as a collection);
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(java.io.File dir, java.lang.String name)
      Implement the accect-method of FilenameFilter
      • Methods inherited from class java.lang.Object

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

      • STANDARD_IMAGES

        public static final ExtensionFilter STANDARD_IMAGES
        A filter for standard-image types (jpg, tif, png, gif and bmp).
      • RAW_IMAGES

        public static final ExtensionFilter RAW_IMAGES
        A filter for raw-image types (the list is taken from Wikipedia, see http://en.wikipedia.org/wiki/Raw_image_format).
    • Constructor Detail

      • ExtensionFilter

        public ExtensionFilter​(java.lang.String... pExt)
        Constructor (pass the extensions as array or as String-arguments).
      • ExtensionFilter

        public ExtensionFilter​(java.util.Collection<java.lang.String> pExt)
        Constructor (pass the extensions as a collection);
    • Method Detail

      • accept

        public boolean accept​(java.io.File dir,
                              java.lang.String name)
        Implement the accect-method of FilenameFilter
        See Also:
        FilenameFilter.accept(java.io.File, java.lang.String)