de.dv.sbu.filefilter.buildin
Class NotFilter

java.lang.Object
  extended by de.dv.sbu.filefilter.buildin.NotFilter
All Implemented Interfaces:
IFileFilter

public class NotFilter
extends java.lang.Object
implements IFileFilter

File filter as a negation of another one. A null filter on a acceptFile(SourceFileInformation) call will return false.

Author:
Daniel Vogtland

Constructor Summary
NotFilter()
           
 
Method Summary
 boolean acceptFile(SourceFileInformation fileInfo)
          Test the given file information object relative to some root directory.
 IFileFilter getFilter()
          Returns the wrapped filter.
 void setFilter(IFileFilter filter)
          Sets the wrapped filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotFilter

public NotFilter()
Method Detail

getFilter

public IFileFilter getFilter()
Returns the wrapped filter.

Returns:
The wrapped filter.

setFilter

public void setFilter(IFileFilter filter)
               throws java.lang.NullPointerException
Sets the wrapped filter.

Parameters:
filter - The filter to set.
Throws:
java.lang.NullPointerException - the given argument is null.

acceptFile

public boolean acceptFile(SourceFileInformation fileInfo)
Test the given file information object relative to some root directory.

Specified by:
acceptFile in interface IFileFilter
Parameters:
fileInfo - The file information to test.
Returns:
true if the file is accepted. false if the file is rejected.
See Also:
IFileFilter.acceptFile(de.dv.sbu.SourceFileInformation)