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

## de.jstacs.io
Class SubstringFilenameFilter

    java.lang.Object
      javax.swing.filechooser.FileFilter
          de.jstacs.io.SubstringFilenameFilter

All Implemented Interfaces:
  FileFilter, FilenameFilter

    public class SubstringFilenameFilter

extends FileFilter
implements FileFilter, FilenameFilter

A simple filter on `File`s that accepts `File`s with a specific substring in the filename.

Author:
  Jens Keilwagen

Nested Class Summary
`static class` | `SubstringFilenameFilter.PartOfName` This `enum` defines the different types of a `String` that can be part of an other `String`, i.e. the different types of substrings.

Constructor Summary
`SubstringFilenameFilter(SubstringFilenameFilter.PartOfName type, String desc, boolean dir, boolean ignoreCase, String... substring)` Creates a new `SubstringFilenameFilter` with given `substring`(s) of type `type` to be found in the filename of the `File`s to be filtered.

Method Summary
`boolean` | `accept(File arg0)`
`boolean` | `accept(File dir, String name)`
`String` | `getDescription()`

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

Constructor Detail

### SubstringFilenameFilter

    public SubstringFilenameFilter(SubstringFilenameFilter.PartOfName type,
                                   String desc,
                                   boolean dir,
                                   boolean ignoreCase,
                                   String... substring)

  Creates a new `SubstringFilenameFilter` with given `substring`(s) of type `type` to be found in the filename of the `File`s to be filtered.

  Parameters:
    `type` - the type of the substring that will be searched
    `desc` - the description of the filter, e.g. "text-files (*.txt)"
    `dir` - a switch that allows directories to be accepted
    `ignoreCase` - indicates whether to ignore the case of the filenames or not
    `substring` - an array of substrings, at least one substring has to be found as specific part (`type`) of the filename so that a "real" `File` will be accepted

Method Detail

### accept

    public boolean accept(File arg0)

  Specified by:
    `accept` in interface `FileFilter`
  Specified by:
    `accept` in class `FileFilter`

### accept

    public boolean accept(File dir,
                          String name)

  Specified by:
    `accept` in interface `FilenameFilter`

### getDescription

    public String getDescription()

  Specified by:
    `getDescription` in class `FileFilter`

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