com.jalios.io
Class AndFileFilter

java.lang.Object
  extended by com.jalios.io.AndFileFilter
All Implemented Interfaces:
java.io.FileFilter

public class AndFileFilter
extends java.lang.Object
implements java.io.FileFilter

Provides AND logic across two FileFilter. This filter accept file if both filters accepts it.

Since:
jcms-5.7.3
Version:
$Revision: 20567 $

Field Summary
protected  java.io.FileFilter filter1
           
protected  java.io.FileFilter filter2
           
static java.lang.String REVISION
           
 
Constructor Summary
AndFileFilter(java.io.FileFilter filter1, java.io.FileFilter filter2)
          Create a new file filter with the specified filters.
 
Method Summary
 boolean accept(java.io.File pathname)
          Accept file if all filters of this AndFileFilter accept it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REVISION

public static final java.lang.String REVISION
See Also:
Constant Field Values

filter1

protected java.io.FileFilter filter1

filter2

protected java.io.FileFilter filter2
Constructor Detail

AndFileFilter

public AndFileFilter(java.io.FileFilter filter1,
                     java.io.FileFilter filter2)
Create a new file filter with the specified filters.

Parameters:
filter1 - the first filter, must not be null
filter2 - the second filter, must not be null
Throws:
java.lang.IllegalArgumentException - if either filter is null
Since:
jcms-5.7.3
Method Detail

accept

public boolean accept(java.io.File pathname)
Accept file if all filters of this AndFileFilter accept it.

Specified by:
accept in interface java.io.FileFilter


Copyright © 2001-2010 Jalios SA. All Rights Reserved.