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

## com.mindprod.filter
Class AvoidJunkFilter

    java.lang.Object
      com.mindprod.filter.JunkFilter
          com.mindprod.filter.AvoidJunkFilter

All Implemented Interfaces:
  java.io.FilenameFilter

    public final class AvoidJunkFilter

extends JunkFilter
implements java.io.FilenameFilter

Filter to permit only non-junk files.

accept only non-junk files. Can define junk files by name, extension, starts with or endsWith lists, the same as you would JunkFilter. Returns false for all directories.

Since:
  2009-05-15
Version:
  1.0 2009-05-15 - initial version
Author:
  Roedy Green, Canadian Mind Products

Constructor Summary
`AvoidJunkFilter()` Defines which filenames and extensions are considered junk, to be deleted.

Method Summary
`boolean` | `accept(java.io.File dir, java.lang.String name)` Accept only junk files to be deleted.

Methods inherited from class com.mindprod.filter.JunkFilter
`setEndsWith, setExtensions, setFilenames, setStartsWith`

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

Constructor Detail

### AvoidJunkFilter

    public AvoidJunkFilter()

  Defines which filenames and extensions are considered junk, to be deleted.

Method Detail

### accept

    public boolean accept(java.io.File dir,
                          java.lang.String name)

  Accept only junk files to be deleted.

  Specified by:
    `accept` in interface `java.io.FilenameFilter`
  Overrides:
    `accept` in class `JunkFilter`
  Parameters:
    `dir` - the directory in which the file was found.
    `name` - the name of the file.
  Returns:
    true if and only if the name should be included in the file list; false otherwise.

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