diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2014-01-10 11:47:20 +0100 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2014-01-10 11:47:20 +0100 |
| commit | 2f903a12fcb61a25fe744680ffa3b2060ab1c009 (patch) | |
| tree | 003cebab4cba58fc962da3af6c15b614631d237f /main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java | |
| parent | 402843c4856c6f353db5ccabab003a9485386351 (diff) | |
| download | cgeo-2f903a12fcb61a25fe744680ffa3b2060ab1c009.zip cgeo-2f903a12fcb61a25fe744680ffa3b2060ab1c009.tar.gz cgeo-2f903a12fcb61a25fe744680ffa3b2060ab1c009.tar.bz2 | |
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.
Diffstat (limited to 'main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java')
| -rw-r--r-- | main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java b/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java index f438762..1ed8e68 100644 --- a/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java +++ b/main/src/cgeo/geocaching/sorting/PopularityRatioComparator.java @@ -11,11 +11,6 @@ import cgeo.geocaching.Geocache; public class PopularityRatioComparator extends AbstractCacheComparator { @Override - protected boolean canCompare(final Geocache cache1, final Geocache cache2) { - return true; - } - - @Override protected int compareCaches(final Geocache cache1, final Geocache cache2) { float ratio1 = 0.0f; |
