<NME> VoteComparator.java
<BEF> package cgeo.geocaching.sorting;

import cgeo.geocaching.models.Geocache;
import cgeo.geocaching.storage.SqlBuilder;
/**
 * 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());
    }
    @Override
    protected int compareCaches(final Geocache cache1, final Geocache cache2) {
        // if there is no vote available, put that cache at the end of the list
        return Float.compare(cache2.getMyVote(), cache1.getMyVote());
    }

    @Override
    public String getSortableSection(@NonNull final Geocache cache) {
        return String.format(Locale.getDefault(), "%.2f", cache.getMyVote());
    }

    @Override
    public void addSortToSql(final SqlBuilder sql, final boolean sortDesc) {
        sql.addOrder(sql.getMainTableId() + ".myvote", !sortDesc);
    }
}

<MSG> reduce visibility

All changes done with UCDetector. This can help in seeing which packages
are not yet self contained (e.g. all the remaining public constants in
GCConstants).
<DFF> @@ -5,10 +5,10 @@ import cgeo.geocaching.Geocache;
 /**
  * sorts caches by the users own voting (if available at all)
  */
-public class VoteComparator extends AbstractCacheComparator {
+class VoteComparator extends AbstractCacheComparator {
 
     @Override
-    protected int compareCaches(Geocache cache1, Geocache cache2) {
+    protected int compareCaches(final Geocache cache1, final Geocache cache2) {
         // if there is no vote available, put that cache at the end of the list
         return Float.compare(cache2.getMyVote(), cache1.getMyVote());
     }

reduce visibility