net.hblok.io
Class OrFileFilter

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.OrFileFilter
All Implemented Interfaces:
FileFilter, Serializable, Cloneable, Iterable<FileFilter>, Collection<FileFilter>, List<FileFilter>, RandomAccess

public class OrFileFilter
extends ArrayList<FileFilter>

FileFilter which combines several filters where one or more must be true for the accept method of this filter to return true. Example: DirectoryFileFilter foo = new DirectoryFileFilter("foo"); RegexFileFilter bar = new RegexFileFilter("bar.*"); OrFileFilter or = new OrFileFilter( foo, bar );

Author:
Havard Rast Blok
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
OrFileFilter()
           
OrFileFilter(FileFilter... filter)
           
 
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

OrFileFilter

public OrFileFilter()

OrFileFilter

public OrFileFilter(FileFilter... filter)
Method Detail

accept

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

toString

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