blob: d2fa085fc4ddfe7dd6d050b584e9208ff3af1c10 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
package cgeo.geocaching.sorting;
import cgeo.geocaching.cgCache;
/**
* comparator which inverses the sort order of the given other comparator
*
*/
public class InverseComparator implements CacheComparator {
private final CacheComparator originalComparator;
public InverseComparator(CacheComparator comparator) {
this.originalComparator = comparator;
}
@Override
public int compare(cgCache lhs, cgCache rhs) {
return originalComparator.compare(rhs, lhs);
}
}
|