commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ola Berg <>
Subject RE: [IO] filefilter sub-package
Date Mon, 29 Jul 2002 08:16:57 GMT
Hen writes:

>On Ola Berg\'s suggestion I worked at an Abstract class which merges the
>filename-filter and file-filter interfaces together. 

Cool. But you could have asked, and I could have done it. Anyway...

>The only fault with
>the one Ola provided was that it only fit if all 
>subclasses wanted to be

Well, yes, but I didn\'t think of it as a fault, but as a way of enforcing it\'s role as an
adapter superclass for FilenameFilter classes wanting to upgrade themselves to FileFilter
classes. In order to prevent accidental misuse I made the accept( File dir, String fileName)
method abstract, meaning that any concrete descendant _has_ to define an implementation for
the FilenameFilter interface.

But before I say too much, I will check out your solution and see for myself. 

BTW, is there a need for doing his adaption dynamically too? My solution was proposed as a
static way of doing it (simply add extends... in the source code). 


0733 - 99 99 17

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message