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/DateComparator.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/DateComparator.java')
| -rw-r--r-- | main/src/cgeo/geocaching/sorting/DateComparator.java | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/main/src/cgeo/geocaching/sorting/DateComparator.java b/main/src/cgeo/geocaching/sorting/DateComparator.java index 091f6a4..76ee955 100644 --- a/main/src/cgeo/geocaching/sorting/DateComparator.java +++ b/main/src/cgeo/geocaching/sorting/DateComparator.java @@ -12,11 +12,6 @@ import java.util.Date; public class DateComparator extends AbstractCacheComparator { @Override - protected boolean canCompare(Geocache cache1, Geocache cache2) { - return true; - } - - @Override protected int compareCaches(Geocache cache1, Geocache cache2) { final Date date1 = cache1.getHiddenDate(); final Date date2 = cache2.getHiddenDate(); |
