IcanGui
Class FileFilter

java.lang.Object
  extended by IcanGui.FileFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class FileFilter
extends java.lang.Object
implements java.io.FilenameFilter

Restrict file names to those with the desired prefix and extension.

Version:
1.0;
Updated by Louis Handler on Nov 16, 1999, 14:27 EST.
Updated by Louis Handler on Jun 16, 1998.
Author:
Louis Handler

Field Summary
private  java.lang.String filterName
          String to use as file name filter.
 
Constructor Summary
FileFilter(java.lang.String name)
          Constructor saves a string in the form "pre*ext" to use as filter.
 
Method Summary
 boolean accept(java.io.File fnt, java.lang.String fnm)
          Method "accept" tests for file name of the given format where there should be one asterisk (*) in the filename to be tested against.
 java.lang.String getName()
          Get class name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

filterName

private java.lang.String filterName
String to use as file name filter. There must be exactly one asterisk (*) within the string. Either the prefix or extension may be missing. Having an extension present is recommended.

Constructor Detail

FileFilter

public FileFilter(java.lang.String name)
Constructor saves a string in the form "pre*ext" to use as filter. There should be one asterisk (*) within the string. Either the prefix or extension may be missing. Having an extension present is recommended.

Parameters:
name - String to use as file name filter. There should be one asterisk (*) within the string. Either the prefix or extension may be missing. Having an extension present is recommended.
See Also:
FilenameFilter
Method Detail

accept

public boolean accept(java.io.File fnt,
                      java.lang.String fnm)
Method "accept" tests for file name of the given format where there should be one asterisk (*) in the filename to be tested against.

Specified by:
accept in interface java.io.FilenameFilter
Parameters:
fnt - File object.
fnm - File name string.
Returns:
true, if file is readable and matches filter; else, false.
See Also:
FilenameFilter.accept(java.io.File, java.lang.String)

getName

public java.lang.String getName()
Get class name.

Returns:
Class name.