Class AndNotPatternFilenameFilter

  extended byorg.jmlspecs.checker.AndNotPatternFilenameFilter
All Implemented Interfaces:

public class AndNotPatternFilenameFilter
extends Object
implements FilenameFilter

Decorates the file name filter given to the constructor so it does not match names that include the pattern given to the constructor.

Gary T. Leavens

Field Summary
private  Pattern excludePat
          The pattern we are excluding
private  FilenameFilter parentFilter
          The filter we are decorating
Constructor Summary
AndNotPatternFilenameFilter(FilenameFilter f, String p)
          Initialize this filter.
Method Summary
 boolean accept(File dir, String name)
          Return true just when we want to process this file name.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


private FilenameFilter parentFilter
The filter we are decorating


private Pattern excludePat
The pattern we are excluding

Constructor Detail


public AndNotPatternFilenameFilter(FilenameFilter f,
                                   String p)
Initialize this filter.

f - the filter to decorate
p - the pattern of file names to exclude
Method Detail


public boolean accept(File dir,
                      String name)
Return true just when we want to process this file name.

Specified by:
accept in interface FilenameFilter


JML is Copyright (C) 1998-2002 by Iowa State University and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This release depends on code from the MultiJava project and is based in part on the Kopi project Copyright (C) 1990-99 DMS Decision Management Systems Ges.m.b.H.