The only reason I can imagine is convenience, since anything you could
implement to call "filenameFilter.accept( dir, filename )", you could just as
easily implement to call "fileFilter.accept( new File( dir, filename ) )".
I also imagine that the idea of "FilenameFilter" must have come before
"FileFilter" in the design discovery process, since any designer proposing to
add "FilenameFilter" after "FileFilter" already existed would surely be told
"well, you can do that with FileFilter; we don't need it." The opposite case
("FilenameFilter" can do everything "FileFilter" can do), although true, is not
clearly true at first blush. Thus, FileFilter could sneak in after
FilenameFilter and yet not replace it.
-- Roger
--- "James A. N. Stauffer" <[EMAIL PROTECTED]> wrote:
> You can also use listFiles(FilenameFilter filter) so that the returned
> array only has what you want in it.
>
> BTW does anyone know why there is a FileFilter and a FilenameFilter?
=====
-- Roger Glover
__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com
To change your JDJList options, please visit: http://www.sys-con.com/java/list.cfm