//# 0 errors, 16 messages
//#
package net.sourceforge.pebble.dao.file;
    //#twodigitfilenamefilter.java:1:1: class: net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter
    //#twodigitfilenamefilter.java:1:1: method: net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter.net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter__static_init

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

/**
 * Filters out files (directories) that aren't named \d\d.
 *
 * @author Simon Brown
 */
public class TwoDigitFilenameFilter implements FilenameFilter {
    //#twodigitfilenamefilter.java:11: method: void net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter.net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter()
    //#twodigitfilenamefilter.java:11: end of method: void net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter.net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter()

  /**
   * Tests if a specified file should be included in a file list.
   *
   * @param file  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 file, String name) {
    return name.matches("\\d\\d\\z");
    //#twodigitfilenamefilter.java:22: method: bool net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter.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)
    //#twodigitfilenamefilter.java:22: end of method: bool net.sourceforge.pebble.dao.file.TwoDigitFilenameFilter.accept(File, String)
  }

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