net.hblok.io
Class AndFileFilter

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<FileFilter>
              extended by net.hblok.io.AndFileFilter
All Implemented Interfaces:
FileFilter, Serializable, Cloneable, Iterable<FileFilter>, Collection<FileFilter>, List<FileFilter>, RandomAccess

public class AndFileFilter
extends ArrayList<FileFilter>

FileFilter which combines several Filters which all must be true for the accept method of this filter to return true. Example: DirectoryFileFilter dirs = new DirectoryFileFilter(); RegexFilenameFilter cvs = new RegexFilenameFilter("CVS"); NegateFileFilter notcvs = new NegateFileFilter(cvs); AndFileFilter and = new AndFileFilter( dirs, notcvs );

Author:
Havard Rast Blok
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
AndFileFilter()
           
AndFileFilter(FileFilter... filters)
           
 
Method Summary
 boolean accept(File pathname)
           
 String toString()
           
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize
 
Methods inherited from class java.util.AbstractList
equals, hashCode, iterator, listIterator, listIterator, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, removeAll, retainAll
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

AndFileFilter

public AndFileFilter()

AndFileFilter

public AndFileFilter(FileFilter... filters)
Method Detail

accept

public boolean accept(File pathname)
Specified by:
accept in interface FileFilter

toString

public String toString()
Overrides:
toString in class AbstractCollection<FileFilter>