org.argouml.util
Class SuffixFilter

java.lang.Object
  extended byjavax.swing.filechooser.FileFilter
      extended byorg.argouml.util.SuffixFilter

public class SuffixFilter
extends FileFilter

This class handles file extensions.


Field Summary
private  String desc
           
private  String suffix
           
 
Constructor Summary
SuffixFilter(String s, String d)
          The constructor.
 
Method Summary
 boolean accept(File f)
           
 String getDescription()
           
static String getExtension(File f)
           
static String getExtension(String filename)
           
 String getSuffix()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

suffix

private final String suffix

desc

private final String desc
Constructor Detail

SuffixFilter

public SuffixFilter(String s,
                    String d)
The constructor.

Parameters:
s - the suffix string
d - the file type description
Method Detail

accept

public boolean accept(File f)
See Also:
FileFilter.accept(java.io.File)

getExtension

public static String getExtension(File f)
Parameters:
f - the file to get the extension from
Returns:
the extension string (without the dot)

getExtension

public static String getExtension(String filename)
Parameters:
filename - the name of the file to get the extension from
Returns:
the extension string (without the dot)

getDescription

public String getDescription()
See Also:
FileFilter.getDescription()

getSuffix

public String getSuffix()
Returns:
Returns the _suffix.


ArgoUML © 1996-2004 (20050222)ArgoUML HomepageArgoUML Developers' pageArgoUML Cookbook