package loc.statistics;

import loc.filter.Filter;

import java.util.Comparator;
import java.util.Map;

public class StatisticsComparator implements Comparator<Map.Entry<Filter, FileStatistics>> {
@Override
	public int compare(Map.Entry<Filter, FileStatistics> o1, Map.Entry<Filter, FileStatistics> o2) {
		if (o1 == null || o2 == null) throw new NullPointerException();
		if (o1.getValue().lineCount < o2.getValue().lineCount) return 1;
		if (o1.getValue().lineCount > o2.getValue().lineCount) return -1;
		if (o1.getValue().fileCount < o2.getValue().fileCount) return 1;
		return -1;
	}
}

@@ -575,17 +575,16 @@
 %09return 
--1
+0
 ;%0A%09%7D%0A%7D%0A

return 0 on equality