blob: a4c06862c934ad91c19e0c75534a000ede0c7d8f (
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;
class FindsComparator extends AbstractCacheComparator {
@Override
protected boolean canCompare(final Geocache cache) {
return cache.getLogCounts() != null;
}
@Override
protected int compareCaches(final Geocache cache1, final Geocache cache2) {
final int finds1 = cache1.getFindsCount();
final int finds2 = cache2.getFindsCount();
return finds2 - finds1;
}
}
|