blob: cd4ad7e7a70e60d901f6ae3a21a29bc5298242ac (
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 the users own voting (if available at all)
*/
public class VoteComparator extends AbstractCacheComparator {
@Override
protected int compareCaches(Geocache cache1, Geocache cache2) {
// if there is no vote available, put that cache at the end of the list
return Float.compare(cache2.getMyVote(), cache1.getMyVote());
}
}
|