diff options
| author | Samuel Tardieu <sam@rfc1149.net> | 2011-09-16 14:36:28 +0200 |
|---|---|---|
| committer | Samuel Tardieu <sam@rfc1149.net> | 2011-09-16 14:36:28 +0200 |
| commit | 579ef7a535489d4aa632db11667a3b01deb6cafd (patch) | |
| tree | 55810021c02ac7d80d3a9702ef0b59e4af154b9c /src/cgeo/geocaching/sorting/DateComparator.java | |
| parent | 96ea21fd50334479c262da692038965d0e4d596a (diff) | |
| download | cgeo-579ef7a535489d4aa632db11667a3b01deb6cafd.zip cgeo-579ef7a535489d4aa632db11667a3b01deb6cafd.tar.gz cgeo-579ef7a535489d4aa632db11667a3b01deb6cafd.tar.bz2 | |
Move sources into the main directory
This prepares the inclusion of tests into the same repository.
Diffstat (limited to 'src/cgeo/geocaching/sorting/DateComparator.java')
| -rw-r--r-- | src/cgeo/geocaching/sorting/DateComparator.java | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/cgeo/geocaching/sorting/DateComparator.java b/src/cgeo/geocaching/sorting/DateComparator.java deleted file mode 100644 index b59e84e..0000000 --- a/src/cgeo/geocaching/sorting/DateComparator.java +++ /dev/null @@ -1,35 +0,0 @@ -package cgeo.geocaching.sorting; - -import cgeo.geocaching.cgCache; - -import java.util.Date; - -/** - * compares caches by date - * - * @author bananeweizen - * - */ -public class DateComparator extends AbstractCacheComparator { - - @Override - protected boolean canCompare(cgCache cache1, cgCache cache2) { - return true; - } - - @Override - protected int compareCaches(cgCache cache1, cgCache cache2) { - Date date1 = cache1.hidden; - Date date2 = cache2.hidden; - if (date1 != null && date2 != null) { - return date1.compareTo(date2); - } - if (date1 != null) { - return -1; - } - if (date2 != null) { - return 1; - } - return 0; - } -} |
