01: /*
02: * UmlGraph class diagram testing framework
03: *
04: * Contibuted by Andrea Aime
05: * (C) Copyright 2005 Diomidis Spinellis
06: *
07: * Permission to use, copy, and distribute this software and its
08: * documentation for any purpose and without fee is hereby granted,
09: * provided that the above copyright notice appear in all copies and that
10: * both that copyright notice and this permission notice appear in
11: * supporting documentation.
12: *
13: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
14: * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
15: * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16: *
17: * $Id$
18: *
19: */
20: package org.umlgraph.test;
21:
22: import java.io.File;
23: import java.io.FilenameFilter;
24:
25: class SimpleFileFilter implements FilenameFilter {
26: protected String extension;
27:
28: public SimpleFileFilter(String ext) {
29: this .extension = ext;
30: }
31:
32: public boolean accept(File dir, String name) {
33: return name.endsWith(extension);
34: }
35: }
|