diff options
Diffstat (limited to 'src/cgeo/geocaching/sorting/VisitComparator.java')
| -rw-r--r-- | src/cgeo/geocaching/sorting/VisitComparator.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/cgeo/geocaching/sorting/VisitComparator.java b/src/cgeo/geocaching/sorting/VisitComparator.java index 79a8ac5..5dfeed4 100644 --- a/src/cgeo/geocaching/sorting/VisitComparator.java +++ b/src/cgeo/geocaching/sorting/VisitComparator.java @@ -4,23 +4,23 @@ import cgeo.geocaching.cgCache; /** * sorts caches by last visited date - * + * */ public class VisitComparator extends AbstractCacheComparator { - @Override - protected boolean canCompare(cgCache cache1, cgCache cache2) { - return cache1.visitedDate != null && cache1.visitedDate > 0 - && cache2.visitedDate != null && cache2.visitedDate > 0; - } + @Override + protected boolean canCompare(cgCache cache1, cgCache cache2) { + return cache1.visitedDate != null && cache1.visitedDate > 0 + && cache2.visitedDate != null && cache2.visitedDate > 0; + } - @Override - protected int compareCaches(cgCache cache1, cgCache cache2) { - if (cache1.visitedDate > cache2.visitedDate) { - return -1; - } else if (cache1.visitedDate < cache2.visitedDate) { - return 1; - } - return 0; - } + @Override + protected int compareCaches(cgCache cache1, cgCache cache2) { + if (cache1.visitedDate > cache2.visitedDate) { + return -1; + } else if (cache1.visitedDate < cache2.visitedDate) { + return 1; + } + return 0; + } } |
