JML

org.jmlspecs.checker
Class AndNotPatternFilenameFilter

java.lang.Object
  extended byorg.jmlspecs.checker.AndNotPatternFilenameFilter
All Implemented Interfaces:
FilenameFilter

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.

Author:
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

parentFilter

private FilenameFilter parentFilter
The filter we are decorating


excludePat

private Pattern excludePat
The pattern we are excluding

Constructor Detail

AndNotPatternFilenameFilter

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

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

accept

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

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.