org.apache.commons.io.filefilter

Class FalseFileFilter

Implemented Interfaces:
FileFilter, FilenameFilter, IOFileFilter, Serializable

public class FalseFileFilter
extends java.lang.Object
implements IOFileFilter, Serializable

A file filter that always returns false.
Version:
$Revision: 587978 $ $Date: 2007-10-24 20:36:51 +0100 (Wed, 24 Oct 2007) $
Author:
Stephen Colebourne
Since:
Commons IO 1.0

Field Summary

static IOFileFilter
FALSE
Singleton instance of false filter.
static IOFileFilter
INSTANCE
Singleton instance of false filter.

Constructor Summary

FalseFileFilter()
Restrictive consructor.

Method Summary

boolean
accept(File file)
Returns false.
boolean
accept(File dir, String name)
Returns false.

Field Details

FALSE

public static final IOFileFilter FALSE
Singleton instance of false filter.
Since:
Commons IO 1.3

INSTANCE

public static final IOFileFilter INSTANCE
Singleton instance of false filter. Please use the identical FalseFileFilter.FALSE constant. The new name is more JDK 1.5 friendly as it doesn't clash with other values when using static imports.

Constructor Details

FalseFileFilter

protected FalseFileFilter()
Restrictive consructor.

Method Details

accept

public boolean accept(File file)
Returns false.
Specified by:
accept in interface IOFileFilter
Parameters:
file - the file to check
Returns:
false

accept

public boolean accept(File dir,
                      String name)
Returns false.
Specified by:
accept in interface IOFileFilter
Parameters:
dir - the directory to check
name - the filename
Returns:
false

Copyright (c) 2002-2008 Apache Software Foundation