blob: f1c5ae344883602525739d6a5d7c2fec38f77862 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package cgeo.geocaching.sorting;
import cgeo.geocaching.cgCache;
/**
* sorts caches by name
*
*/
public class NameComparator extends AbstractCacheComparator {
@Override
protected boolean canCompare(cgCache cache1, cgCache cache2) {
return cache1.name != null && cache2.name != null;
}
@Override
protected int compareCaches(cgCache cache1, cgCache cache2) {
return cache1.name.compareToIgnoreCase(cache2.name);
}
}
|