EDU.gatech.cc.is.util
Class FilenameFilterByEnding
java.lang.Object
|
+--EDU.gatech.cc.is.util.FilenameFilterByEnding
- public class FilenameFilterByEnding
- extends java.lang.Object
- implements java.io.FilenameFilter
Create a FilenameFilter that only accepts names whose ending matches
a given value.
Copyright (c)2000 Tucker Balch
Method Summary |
boolean |
accept(java.io.File d,
java.lang.String name)
Check a filename to see if it meets critera. |
static void |
main(java.lang.String[] args)
Test the filter. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
FilenameFilterByEnding
public FilenameFilterByEnding(java.lang.String e)
- Create a FilenameFilterByEnding object.
- Parameters:
e
- String, the ending to match.
accept
public boolean accept(java.io.File d,
java.lang.String name)
- Check a filename to see if it meets critera.
- Specified by:
- accept in interface java.io.FilenameFilter
- Parameters:
d
- File, the file.name
- String, the name of the file.- Returns:
- true if ending matches, false otherwise.
main
public static void main(java.lang.String[] args)
- Test the filter.