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.jboss.util.file
Class FilenamePrefixFilter

    java.lang.Object
      org.jboss.util.file.FilenamePrefixFilter

All Implemented Interfaces:
  FilenameFilter

public class FilenamePrefixFilter
extends Object
implements FilenameFilter

A prefix based filename filter.

Version:
  `$Revision: 1.1 $`
Author:
  Jason Dillon

Field Summary
`protected boolean` | `ignoreCase` Flag to signal that we want to ignore the case.
`protected String` | `prefix` The prefix which files must have to be accepted.

Constructor Summary
`FilenamePrefixFilter(String prefix)` Construct a case sensitive `FilenamePrefixFilter`.
`FilenamePrefixFilter(String prefix, boolean ignoreCase)` Construct a `FilenamePrefixFilter`.

Method Summary
`boolean` | `accept(File dir, String name)` Check if a file is acceptible.

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

Field Detail

### prefix

    protected final String prefix

  The prefix which files must have to be accepted.

### ignoreCase

    protected final boolean ignoreCase

  Flag to signal that we want to ignore the case.

Constructor Detail

### FilenamePrefixFilter

    public FilenamePrefixFilter(String prefix,
                                boolean ignoreCase)

  Construct a `FilenamePrefixFilter`.

Parameters:
  `prefix` - The prefix which files must have to be accepted.
  `ignoreCase` - `True` if the filter should be case-insensitive.

### FilenamePrefixFilter

    public FilenamePrefixFilter(String prefix)

  Construct a case sensitive `FilenamePrefixFilter`.

Parameters:
  `prefix` - The prefix which files must have to be accepted.

Method Detail

### accept

    public boolean accept(File dir,
                          String name)

  Check if a file is acceptible.

  Specified by:
    `accept` in interface `FilenameFilter`
  Parameters:
    `dir` - The directory the file resides in.
    `name` - The name of the file.
  Returns:
    `true` if the file is acceptable.

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 JBoss Group, LLC. All Rights Reserved.