44 |
*/ |
*/ |
45 |
|
|
46 |
/** |
/** |
47 |
* This interface has one method which is used for filtering filenames |
* This interface has one method which is used for filtering filenames |
48 |
* returned in a directory listing. It is currently used by the |
* returned in a directory listing. It is currently used by the |
49 |
* <code>File.list()</code> method and by the filename dialog in AWT. |
* <code>File.list()</code> method and by the filename dialog in AWT. |
50 |
* <p> |
* <p> |
51 |
* The method in this interface determines if a particular file should |
* The method in this interface determines if a particular file should |
52 |
* or should not be included in the file listing. |
* or should not be included in the file listing. |
53 |
* |
* |
54 |
* @author Aaron M. Renn (arenn@urbanophile.com) |
* @author Aaron M. Renn (arenn@urbanophile.com) |
55 |
* @author Tom Tromey <tromey@cygnus.com> |
* @author Tom Tromey <tromey@cygnus.com> |
56 |
*/ |
*/ |
57 |
public interface FilenameFilter |
public interface FilenameFilter |
58 |
{ |
{ |
59 |
|
|
60 |
/** |
/** |
61 |
* This method determines whether or not a given file should be included |
* This method determines whether or not a given file should be included |
62 |
* in a directory listing. |
* in a directory listing. |
63 |
* |
* |
64 |
* @param dir The <code>File</code> instance for the directory being read |
* @param dir The <code>File</code> instance for the directory being read |
65 |
* @param name The name of the file to test |
* @param name The name of the file to test |
66 |
* |
* |
67 |
* @return <code>true</code> if the file should be included in the list, |
* @return <code>true</code> if the file should be included in the list, |
68 |
* <code>false</code> otherwise. |
* <code>false</code> otherwise. |
69 |
*/ |
*/ |
70 |
boolean accept(File dir, String name); |
boolean accept(File dir, String name); |
71 |
|
|
72 |
} // interface FilenameFilter |
} // interface FilenameFilter |