bb.io.filefilter
Class TarableFilter

java.lang.Object
  extended by javax.swing.filechooser.FileFilter
      extended by bb.io.filefilter.BaseFilter
          extended by bb.io.filefilter.TarableFilter
All Implemented Interfaces:
FileFilter

public class TarableFilter
extends BaseFilter

Filter that accepts everything which passes TarUtil.isTarable.

This class is multithread safe: it is immutable. In particular, it has no listener (see the ancestor class javadocs for more discussion).

Author:
Brent Boyer

Nested Class Summary
 
Nested classes/interfaces inherited from class bb.io.filefilter.BaseFilter
BaseFilter.UnitTest
 
Constructor Summary
TarableFilter(FileFilterListener listener)
          Constructor.
 
Method Summary
 String getDescription()
          
protected  boolean passesTest(File file)
          Applies this filter's test to file.
 
Methods inherited from class bb.io.filefilter.BaseFilter
accept, acceptImpl, extractPart, getDirectoryMode, getFileMode, getListener, getOtherMode, getPartMode, passesTest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TarableFilter

public TarableFilter(FileFilterListener listener)
Constructor.

Parameters:
listener - an optional FileFilterListener to receive File accept/reject events; may be null
Method Detail

passesTest

protected boolean passesTest(File file)
Description copied from class: BaseFilter
Applies this filter's test to file.

Implementation here returns passesTest( extractPart(file) ).

Overrides:
passesTest in class BaseFilter

getDescription

public String getDescription()
Description copied from class: BaseFilter

Specified by:
getDescription in class BaseFilter