util
Class ExtensionFilter

java.lang.Object
  extended by util.ExtensionFilter
All Implemented Interfaces:
FileFilter

public class ExtensionFilter
extends Object
implements FileFilter

Class that allows selection of files with a certain extension, either caase or non-case sensitive.


Field Summary
private  String extension
          The extension accepted.
private  boolean noncase
          If false, we allow non-case sensitive matching.
 
Constructor Summary
ExtensionFilter(String ext)
          Constructs a per default case-sensitive extension filter.
ExtensionFilter(String ext, boolean ignore)
          Constructs a extension filter that might be non-case sensitive.
 
Method Summary
 boolean accept(File that)
          Accepts file that end with my extension.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extension

private String extension
The extension accepted.


noncase

private boolean noncase
If false, we allow non-case sensitive matching.

Constructor Detail

ExtensionFilter

public ExtensionFilter(String ext)
Constructs a per default case-sensitive extension filter.


ExtensionFilter

public ExtensionFilter(String ext,
                       boolean ignore)
Constructs a extension filter that might be non-case sensitive.

Method Detail

accept

public boolean accept(File that)
Accepts file that end with my extension.

Specified by:
accept in interface FileFilter