package bogush;

import java.util.HashMap;
import java.util.Map;

public class Statistics {
    private int totalLines;
    private int totalFiles;
    private Map<Filter, FileStatistics> filterFileStatisticsMap;

    Statistics() {
        filterFileStatisticsMap = new HashMap<>();
    }

    void increaseLineCounter(Filter filter, int amount) {
        if (amount == 0) {
            return;
        }
        filterFileStatisticsMap.putIfAbsent(filter, new FileStatistics());
        filterFileStatisticsMap.get(filter).lineCount += amount;
        totalLines += amount;
    }

    void increaseFileCounter(Filter filter, int amount) {
        if (amount == 0) {
            return;
        }
        filterFileStatisticsMap.putIfAbsent(filter, new FileStatistics());
        filterFileStatisticsMap.get(filter).fileCount += amount;
        totalFiles += amount;
    }

    @Override
    public String toString() {
        String string = "Total " + totalLines + " lines in " + totalFiles + " files:\n";
        for (Map.Entry<Filter, FileStatistics> pair: filterFileStatisticsMap.entrySet()) {
            string += "\t" + pair.getKey() + ": " + pair.getValue() + "\n";
        }
        return string;
    }
}

@@ -864,24 +864,275 @@
 unt;%0A    %7D%0A%0A
+    public int getTotalLines() %7B%0A        return totalLines;%0A    %7D%0A%0A    public int getTotalFiles() %7B%0A        return totalFiles;%0A    %7D%0A%0A    public Map%3CFilter, FileStatistics%3E getFilterFileStatisticsMap() %7B%0A        return filterFileStatisticsMap;%0A    %7D%0A%0A
     @Overrid

Add getters