blob: 7f2ef5052518e438c896c98d2a1a2ced8d51fd11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
package cgeo.geocaching.sorting;
import cgeo.geocaching.Geocache;
public class FindsComparator extends AbstractCacheComparator {
@Override
protected boolean canCompare(Geocache cache) {
return cache.getLogCounts() != null;
}
@Override
protected int compareCaches(Geocache cache1, Geocache cache2) {
int finds1 = cache1.getFindsCount();
int finds2 = cache2.getFindsCount();
return finds2 - finds1;
}
}
|