Back to index

wims  3.65+svn20090927
Public Member Functions | Package Attributes
WIMSchem.FileExtFilter Class Reference

List of all members.

Public Member Functions

 FileExtFilter (String descroot, String suffixes)
String getDescription ()
boolean accept (File f)

Package Attributes

String descr
ArrayList< String > exts

Detailed Description

Definition at line 21 of file FileExtFilter.java.


Constructor & Destructor Documentation

WIMSchem.FileExtFilter.FileExtFilter ( String  descroot,
String  suffixes 
) [inline]

Definition at line 26 of file FileExtFilter.java.

    {
       exts=new ArrayList<String>();
       StringTokenizer tok=new StringTokenizer(suffixes,";");
       while (tok.hasMoreTokens()) exts.add(tok.nextToken());
       
       descr=descroot+" (";
       for (int n=0;n<exts.size();n++) descr=descr+(n>0 ? " " : "")+"*"+exts.get(n);
       descr=descr+")";
    }

Member Function Documentation

boolean WIMSchem.FileExtFilter.accept ( File  f) [inline]

Definition at line 39 of file FileExtFilter.java.

    {
       if (f.isDirectory()) return true;
       for (int n=0;n<exts.size();n++) if (f.getName().endsWith(exts.get(n))) return true;
       return false;
    }

Definition at line 37 of file FileExtFilter.java.

{return descr;}

Member Data Documentation

String WIMSchem.FileExtFilter.descr [package]

Definition at line 23 of file FileExtFilter.java.

ArrayList<String> WIMSchem.FileExtFilter.exts [package]

Definition at line 24 of file FileExtFilter.java.


The documentation for this class was generated from the following file: