Class NotFilter

  extended bysmbdav.filters.NotFilter
All Implemented Interfaces:
DavenportFileFilter, jcifs.smb.SmbFileFilter

public class NotFilter
extends java.lang.Object
implements DavenportFileFilter

This class inverts the result of an underlying filter; a file will be accepted by the filter only if the underlying filter rejects the file. This is effectively a logical NOT.

This filter accepts a filter parameter containing the underlying filter class. If the filter class implements the smbdav.DavenportFileFilter interface, the instance will be initialized with a copy of this filter's properties (excluding the "filter" property itself). For example:


The fileFilters parameter declares a single NotFilter ("myNotFilter"). This filter is passed the "filter" property, specifying as the subfilter class. This subfilter class is instantiated, and provided a copy of this filter's properties (containing the single property "subProperty" with the value "subValue"). Note that the "filter" property is removed from the properties copy provided to the subfilter.

Eric Glass

Constructor Summary
Method Summary
 boolean accept(jcifs.smb.SmbFile file)
 void destroy()
          Destroys the filter instance.
 void init(java.util.Properties properties)
          Initializes the filter with the provided properties.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public NotFilter()
Method Detail


public void init(java.util.Properties properties)
          throws java.lang.Exception
Description copied from interface: DavenportFileFilter
Initializes the filter with the provided properties.

Specified by:
init in interface DavenportFileFilter
properties - The filter's initialization properties.
java.lang.Exception - If an error occurs during initialization.


public void destroy()
Description copied from interface: DavenportFileFilter
Destroys the filter instance.

Specified by:
destroy in interface DavenportFileFilter


public boolean accept(jcifs.smb.SmbFile file)
               throws jcifs.smb.SmbException
Specified by:
accept in interface jcifs.smb.SmbFileFilter

Copyright © 2004 Eric Glass