## loci.formats
Class ExtensionFileFilter

    java.lang.Object
      javax.swing.filechooser.FileFilter
          loci.formats.ExtensionFileFilter

All Implemented Interfaces:
  Comparable, FileFilter

Direct Known Subclasses:
  ExtensionFileFilter

public class ExtensionFileFilter
extends FileFilter
implements FileFilter, Comparable

A file filter based on file extensions, for use with a JFileChooser.

Constructor Summary
`ExtensionFileFilter(String[] extensions, String description)` Constructs a new filter that accepts the given extensions.
`ExtensionFileFilter(String extension, String description)` Constructs a new filter that accepts the given extension.

Method Summary
`boolean` `accept(File f)` Accepts files with the proper extensions.
`int` `compareTo(Object o)` Compares two FileFilter objects alphanumerically.
`String` `getDescription()` Gets the filter's description
`String` `getExtension()` Gets the filter's first valid extension.
`String[]` `getExtensions()` Gets the filter's valid extensions.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExtensionFileFilter

    public ExtensionFileFilter(String extension,
                               String description)

  Constructs a new filter that accepts the given extension.

### ExtensionFileFilter

    public ExtensionFileFilter(String[] extensions,
                               String description)

  Constructs a new filter that accepts the given extensions.

Method Detail

### accept

    public boolean accept(File f)

  Accepts files with the proper extensions.

  Specified by:
    `accept` in interface `FileFilter`

### getExtension

    public String getExtension()

  Gets the filter's first valid extension.

### getExtensions

    public String[] getExtensions()

  Gets the filter's valid extensions.

### getDescription

    public String getDescription()

  Gets the filter's description

### compareTo

    public int compareTo(Object o)

  Compares two FileFilter objects alphanumerically.

  Specified by:
    `compareTo` in interface `Comparable`