ptolemy.backtrack.util
Class PathFinder.PostfixFilter

java.lang.Object
  extended by ptolemy.backtrack.util.PathFinder.PostfixFilter
All Implemented Interfaces:
java.io.FileFilter
Enclosing class:
PathFinder

public static class PathFinder.PostfixFilter
extends java.lang.Object
implements java.io.FileFilter

Filter out all the files in a directory, except for those ending with the given postfix.

Since:
Ptolemy II 4.1
Version:
$Id: PathFinder.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Feng
Proposed Rating:
Red (tfeng)

Field Summary
private  java.lang.String _postfix
          The postfix.
 
Constructor Summary
PathFinder.PostfixFilter(java.lang.String postfix)
          Construct a filter with a postfix.
 
Method Summary
 boolean accept(java.io.File file)
          Accept only files with names ending with the given postfix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_postfix

private java.lang.String _postfix
The postfix.

Constructor Detail

PathFinder.PostfixFilter

PathFinder.PostfixFilter(java.lang.String postfix)
Construct a filter with a postfix.

Parameters:
postfix - The postfix.
Method Detail

accept

public boolean accept(java.io.File file)
Accept only files with names ending with the given postfix.

Specified by:
accept in interface java.io.FileFilter
Parameters:
file - The file to be inspected.
Returns:
true if the file name ends with the given postfix.