org.mmbase.util
Class SPartFileFilter

java.lang.Object
  |
  +--org.mmbase.util.SPartFileFilter
All Implemented Interfaces:
java.io.FilenameFilter

public class SPartFileFilter
extends java.lang.Object
implements java.io.FilenameFilter

Support utility for MMObjectBuilder.getSPartPath This filter filters files with the specified number in its name.


Constructor Summary
SPartFileFilter(java.lang.String nodeNumber)
          Creates the file filter.
 
Method Summary
 boolean accept(java.io.File dir, java.lang.String name)
          Checks whether a file has the node number in its file path.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPartFileFilter

public SPartFileFilter(java.lang.String nodeNumber)
Creates the file filter.
Parameters:
nodeNumber - the number to filter on.
Method Detail

accept

public boolean accept(java.io.File dir,
                      java.lang.String name)
Checks whether a file has the node number in its file path. This checks on the exact number - so if the number to search on is '100', If the path contains a number such as '1001' or '1100' it will return false.
Specified by:
accept in interface java.io.FilenameFilter
Parameters:
dir - The directory as a File (unused in this filter)
name - The file name to check
Returns:
true if the number is in the path, false otherwise.


MMBase 2001