21 lines
630 B
Java
21 lines
630 B
Java
package listem;
|
|
|
|
import java.io.File;
|
|
import java.util.Map;
|
|
|
|
public interface LineCounter {
|
|
|
|
/**
|
|
* Count the number of lines in files whose names match a given pattern.
|
|
*
|
|
* @param directory The base directory to look at files from
|
|
* @param fileSelectionPattern Pattern for selecting file names
|
|
* @param recursive Recursively search through directories
|
|
* @return A Map containing files whose lines were counted. Each file is mapped
|
|
* to an integer which is the number of lines counted in the file.
|
|
*/
|
|
public Map<File, Integer> countLines(File directory, String fileSelectionPattern,
|
|
boolean recursive);
|
|
|
|
}
|