站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

FilePrefixFilter (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.util.file
Class FilePrefixFilter

java.lang.Object
  extended byorg.jboss.util.file.FilePrefixFilter
All Implemented Interfaces:
FileFilter

public class FilePrefixFilter
extends Object
implements FileFilter

A prefix based file 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
FilePrefixFilter(String prefix)
          Construct a case sensitive FilePrefixFilter.
FilePrefixFilter(String prefix, boolean ignoreCase)
          Construct a FilePrefixFilter.
 
Method Summary
 boolean accept(File file)
          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

FilePrefixFilter

public FilePrefixFilter(String prefix,
                        boolean ignoreCase)
Construct a FilePrefixFilter.

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

FilePrefixFilter

public FilePrefixFilter(String prefix)
Construct a case sensitive FilePrefixFilter.

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

accept

public boolean accept(File file)
Check if a file is acceptible.

Specified by:
accept in interface FileFilter
Parameters:
file - The file to check.
Returns:
true if the file is acceptable.


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.