File Source: twodigitfilenamefilter.java
/*
P/P * Method: net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter__static_init
*/
1 package net.sourceforge.pebble.dao.file;
2
3 import java.io.FilenameFilter;
4 import java.io.File;
5
6 /**
7 * Filters out files (directories) that aren't named \d\d.
8 *
9 * @author Simon Brown
10 */
/*
P/P * Method: void net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter()
*/
11 public class TwoDigitFilenameFilter implements FilenameFilter {
12
13 /**
14 * Tests if a specified file should be included in a file list.
15 *
16 * @param file the directory in which the file was found.
17 * @param name the name of the file.
18 * @return <code>true</code> if and only if the name should be
19 * included in the file list; <code>false</code> otherwise.
20 */
21 public boolean accept(File file, String name) {
/*
P/P * Method: bool accept(File, String)
*
* Preconditions:
* name != null
*
* Postconditions:
* init'ed(return_value)
*/
22 return name.matches("\\d\\d\\z");
23 }
24
25 }
SofCheck Inspector Build Version : 2.22510
| twodigitfilenamefilter.java |
2010-Jun-25 19:40:32 |
| twodigitfilenamefilter.class |
2010-Jul-19 20:23:40 |