|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mindprod.filter.RecentFilter
public final class RecentFilter
filter out all but recent files (or old files)., Usually cascaded with some other filter.
Field Summary | |
---|---|
static boolean |
AFTER
convenience constant so you don't have to remember that false means ask for files before the date. |
static boolean |
BEFORE
convenience constant so you don't have to remember that true means ask for files before the date. |
static boolean |
DEBUGGING
true if debugging. |
Constructor Summary | |
---|---|
RecentFilter(long timestamp,
boolean before)
constructor |
Method Summary | |
---|---|
boolean |
accept(java.io.File dir,
java.lang.String name)
Select only files with the appropriate timestamps |
static void |
main(java.lang.String[] args)
TEST harness |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean AFTER
public static final boolean BEFORE
public static final boolean DEBUGGING
Constructor Detail |
---|
public RecentFilter(long timestamp, boolean before)
timestamp
- e.g. for one hour ago : System.currentTimeMillis() - 1000L * 60 * 60 * 1 Timestamp to separate
files by lastModified date.before
- true BEFORE if you want old files before the timestamp date/elapsedTime. false AFTER if you want
recent files after the timestamp date/elapsedTime.Method Detail |
---|
public boolean accept(java.io.File dir, java.lang.String name)
accept
in interface java.io.FilenameFilter
dir
- the directory in which the file was found.name
- the name of the file
public static void main(java.lang.String[] args)
args
- not used
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |