com.armatiek.infofuze.stream.filesystem.filefilter
Class NotFileFilter

java.lang.Object
  extended by com.armatiek.infofuze.stream.filesystem.filefilter.NotFileFilter
All Implemented Interfaces:
IOFileFilter, java.io.Serializable

public class NotFileFilter
extends java.lang.Object
implements IOFileFilter, java.io.Serializable

This filter produces a logical NOT of the filters specified. Based on code from Apache Commons IO version 2.01. The main difference is that this class filters objects that implement FileIf, not File. Original author Stephen Colebourne

See Also:
Serialized Form

Constructor Summary
NotFileFilter(IOFileFilter filter)
          Constructs a new file filter that NOTs the result of another filter.
 
Method Summary
 boolean accept(FileIf file)
          Returns the logical NOT of the underlying filter's return value for the same File.
 java.lang.String toString()
          Provide a String representaion of this file filter.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NotFileFilter

public NotFileFilter(IOFileFilter filter)
Constructs a new file filter that NOTs the result of another filter.

Parameters:
filter - the filter, must not be null
Throws:
java.lang.IllegalArgumentException - if the filter is null
Method Detail

accept

public boolean accept(FileIf file)
Returns the logical NOT of the underlying filter's return value for the same File.

Specified by:
accept in interface IOFileFilter
Parameters:
file - the File to check
Returns:
true if the filter returns false

toString

public java.lang.String toString()
Provide a String representaion of this file filter.

Overrides:
toString in class java.lang.Object
Returns:
a String representaion