core.filter
Class MediaFileFilter

java.lang.Object
  extended by core.filter.MediaFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class MediaFileFilter
extends java.lang.Object
implements java.io.FilenameFilter

This class provides the file filter for the DuplicatesTask class.


Constructor Summary
MediaFileFilter(java.lang.String[] ext)
          Creates a new MediaFileFilter object given an array of file extensions.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          This method will determine whether to accept a file or not through the file filter based on whether or not the file name ends with one of the given extension.
 java.lang.String getDescription()
          Returns the description of the extensions to accept.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MediaFileFilter

public MediaFileFilter(java.lang.String[] ext)
Creates a new MediaFileFilter object given an array of file extensions.

Parameters:
ext - the extensions to filter files by.
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
This method will determine whether to accept a file or not through the file filter based on whether or not the file name ends with one of the given extension.

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - the File to check for acceptance by the filter.
name - the file name of the given file.
Returns:
whether or not the file is acceptable file given the extensions to accept.

getDescription

public java.lang.String getDescription()
Returns the description of the extensions to accept.

Returns:
the description of the extensions to accept.