de.jstacs.io
Class DateFileFilter

java.lang.Object
  extended by de.jstacs.io.DateFileFilter
All Implemented Interfaces:
FileFilter

public class DateFileFilter
extends Object
implements FileFilter

This class implements a FileFilter that accepts Files that were modified after the date that is given in the constructor.

Author:
Jens Keilwagen

Constructor Summary
DateFileFilter(Date d)
          Creates an instance that accepts Files that were modified after d.
DateFileFilter(int year, int month, int dayOfMonth, int hrs, int min, int sec)
          Creates an instance that accepts Files that were modified after the given year, month, ...
 
Method Summary
 boolean accept(File f)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DateFileFilter

public DateFileFilter(int year,
                      int month,
                      int dayOfMonth,
                      int hrs,
                      int min,
                      int sec)
Creates an instance that accepts Files that were modified after the given year, month, ... .

Parameters:
year - the year
month - the month
dayOfMonth - the day of the month
hrs - the hours
min - the minutes
sec - the seconds
See Also:
GregorianCalendar.GregorianCalendar(int, int, int, int, int, int)

DateFileFilter

public DateFileFilter(Date d)
Creates an instance that accepts Files that were modified after d.

Parameters:
d - the date used to decide whether a File will be accepted or not
Method Detail

accept

public boolean accept(File f)
Specified by:
accept in interface FileFilter

toString

public String toString()
Overrides:
toString in class Object