//# 0 errors, 16 messages
//#
package net.sourceforge.pebble.dao.file;
    //#blogentryfilenamefilter.java:1:1: class: net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter
    //#blogentryfilenamefilter.java:1:1: method: net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter.net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__static_init

import java.io.FilenameFilter;
import java.io.File;

/**
 * Filters out any files that aren't blog entries.
 *
 * @author Simon Brown
 */
public class BlogEntryFilenameFilter implements FilenameFilter {
    //#blogentryfilenamefilter.java:11: method: void net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter.net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter()
    //#blogentryfilenamefilter.java:11: end of method: void net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter.net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter()

  /**
   * Tests if a specified file should be included in a file list.
   *
   * @param dir  the directory in which the file was found.
   * @param name the name of the file.
   * @return <code>true</code> if and only if the name should be
   *         included in the file list; <code>false</code> otherwise.
   */
  public boolean accept(File dir, String name) {
    return name.matches("\\d+.xml\\z");
    //#blogentryfilenamefilter.java:22: method: bool net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter.accept(File, String)
    //#input(bool accept(File, String)): name
    //#output(bool accept(File, String)): return_value
    //#pre[1] (bool accept(File, String)): name != null
    //#post(bool accept(File, String)): init'ed(return_value)
    //#blogentryfilenamefilter.java:22: end of method: bool net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter.accept(File, String)
  }

}
    //#output(net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__static_init): __Descendant_Table[net/sourceforge/pebble/dao/file/BlogEntryFilenameFilter]
    //#output(net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__static_init): __Dispatch_Table.accept(Ljava/io/File;Ljava/lang/String;)Z
    //#post(net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__static_init): __Descendant_Table[net/sourceforge/pebble/dao/file/BlogEntryFilenameFilter] == &__Dispatch_Table
    //#post(net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__static_init): __Dispatch_Table.accept(Ljava/io/File;Ljava/lang/String;)Z == &accept
    //#blogentryfilenamefilter.java:: end of method: net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter.net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter__static_init
    //#blogentryfilenamefilter.java:: end of class: net.sourceforge.pebble.dao.file.BlogEntryFilenameFilter
