aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/sorting/PopularityComparator.java
blob: 2dbee6815b2b95b2fc2fcb65611e7d8338c84a5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package cgeo.geocaching.sorting;

import cgeo.geocaching.Geocache;

/**
 * sorts caches by popularity (favorite count)
 *
 */
public class PopularityComparator extends AbstractCacheComparator {

    @Override
    protected int compareCaches(final Geocache cache1, final Geocache cache2) {
        return cache2.getFavoritePoints() - cache1.getFavoritePoints();
    }
}