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

import cgeo.geocaching.models.Geocache;
import cgeo.geocaching.storage.SqlBuilder;

import androidx.annotation.NonNull;
 */
public class VoteComparator extends AbstractCacheComparator {

    @Override
    protected boolean canCompare(Geocache cache1, Geocache cache2) {
        return true;
    }

    @Override
    protected int compareCaches(Geocache cache1, Geocache cache2) {
        // if there is no vote available, put that cache at the end of the list
class VoteComparator extends AbstractCacheComparator {

    @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> Simplify comparison implementation

This was triggered by issue #3532. The comparator interface could return
the following facts simultaneously A == B, A == C, B < C if A could
not be compared to others.

Now we will have A placed after B and C in any case.

Also, since most comparators can compare all caches, the defalut is true
and can be overriden if needed.

<DFF> @@ -7,11 +7,6 @@ import cgeo.geocaching.Geocache;
  */
 public class VoteComparator extends AbstractCacheComparator {
 
-    @Override
-    protected boolean canCompare(Geocache cache1, Geocache cache2) {
-        return true;
-    }
-
     @Override
     protected int compareCaches(Geocache cache1, Geocache cache2) {
         // if there is no vote available, put that cache at the end of the list

Simplify comparison implementation