blogentryfilenamefilter.java

### File Source: blogentryfilenamefilter.java

             /*
        P/P   *  Method: net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__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 any files that aren't blog entries.
         8   *
         9   * @author Simon Brown
        10   */
             /*
        P/P   *  Method: void net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter()
              */
        11  public class BlogEntryFilenameFilter implements FilenameFilter {
        12
        13    /**
        14     * Tests if a specified file should be included in a file list.
        15     *
        16     * @param dir  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 dir, String name) {
                 /*
        P/P       *  Method: bool accept(File, String)
                  *
                  *  Preconditions:
                  *    name != null
                  *
                  *  Postconditions:
                  *    init'ed(return_value)
                  */
        22      return name.matches("\\d+.xml\\z");
        23    }
        24
        25  }

SofCheck Inspector Build Version : 2.22510

blogentryfilenamefilter.java | 2010-Jun-25 19:40:32
blogentryfilenamefilter.class | 2010-Jul-19 20:23:40