Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.commons.io.filefilter
Class TrueFileFilter

    java.lang.Object
      org.apache.commons.io.filefilter.TrueFileFilter

All Implemented Interfaces:
  FileFilter, FilenameFilter, Serializable, IOFileFilter

    public class TrueFileFilter

extends Object
implements IOFileFilter, Serializable

A file filter that always returns true.

Since:
  Commons IO 1.0
Version:
  $Revision: 1005099 $ $Date: 2010-10-06 17:13:01 +0100 (Wed, 06 Oct 2010) $
Author:
  Stephen Colebourne
See Also:
  `FileFilterUtils.trueFileFilter()`, Serialized Form

Field Summary
`static IOFileFilter` | `INSTANCE` Singleton instance of true filter.
`static IOFileFilter` | `TRUE` Singleton instance of true filter.

Constructor Summary
`protected` | `TrueFileFilter()` Restrictive consructor.

Method Summary
`boolean` | `accept(File file)` Returns true.
`boolean` | `accept(File dir, String name)` Returns true.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### TRUE

    public static final IOFileFilter TRUE

  Singleton instance of true filter.

  Since:
    Commons IO 1.3

### INSTANCE

    public static final IOFileFilter INSTANCE

  Singleton instance of true filter. Please use the identical TrueFileFilter.TRUE constant. The new name is more JDK 1.5 friendly as it doesn't clash with other values when using static imports.

Constructor Detail

### TrueFileFilter

    protected TrueFileFilter()

  Restrictive consructor.

Method Detail

### accept

    public boolean accept(File file)

  Returns true.

  Specified by:
    `accept` in interface `FileFilter`
  Specified by:
    `accept` in interface `IOFileFilter`
  Parameters:
    `file` - the file to check
  Returns:
    true

### accept

    public boolean accept(File dir,
                          String name)

  Returns true.

  Specified by:
    `accept` in interface `FilenameFilter`
  Specified by:
    `accept` in interface `IOFileFilter`
  Parameters:
    `dir` - the directory to check
    `name` - the filename
  Returns:
    true

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2010 The Apache Software Foundation. All Rights Reserved.