home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 November / Chip_1998-11_cd.bin / tema / Cafe / main.bin / FilenameFilter.java < prev    next >
Text File  |  1997-05-20  |  2KB  |  53 lines

  1. /*
  2.  * @(#)FilenameFilter.java    1.14 97/01/22
  3.  * 
  4.  * Copyright (c) 1995, 1996 Sun Microsystems, Inc. All Rights Reserved.
  5.  * 
  6.  * This software is the confidential and proprietary information of Sun
  7.  * Microsystems, Inc. ("Confidential Information").  You shall not
  8.  * disclose such Confidential Information and shall use it only in
  9.  * accordance with the terms of the license agreement you entered into
  10.  * with Sun.
  11.  * 
  12.  * SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
  13.  * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  14.  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
  15.  * PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
  16.  * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
  17.  * THIS SOFTWARE OR ITS DERIVATIVES.
  18.  * 
  19.  * CopyrightVersion 1.1_beta
  20.  * 
  21.  */
  22.  
  23. package java.io;
  24.  
  25. /**
  26.  * Instances of classes that implement this interface are used to 
  27.  * filter filenames. These instances are used to filter directory 
  28.  * listings in the <code>list</code> method of class 
  29.  * <code>File</code>, and by the Abstract Window Toolkit's file 
  30.  * dialog component. 
  31.  *
  32.  * @author  Arthur van Hoff
  33.  * @author  Jonathan Payne
  34.  * @version 1.14, 01/22/97
  35.  * @see     java.awt.FileDialog#setFilenameFilter(java.io.FilenameFilter)
  36.  * @see     java.io.File
  37.  * @see     java.io.File#list(java.io.FilenameFilter)
  38.  * @since   JDK1.0
  39.  */
  40. public
  41. interface FilenameFilter {
  42.     /**
  43.      * Tests if a specified file should be included in a file list.
  44.      *
  45.      * @param   dir    the directory in which the file was found.
  46.      * @param   name   the name of the file.
  47.      * @return  <code>true</code> if the name should be included in the file
  48.      *          list; <code>false</code> otherwise.
  49.      * @since   JDK1.0
  50.      */
  51.     boolean accept(File dir, String name);
  52. }
  53.