aboutsummaryrefslogtreecommitdiffstats
path: root/src/cgeo/geocaching/cgCacheInventoryComparator.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/cgeo/geocaching/cgCacheInventoryComparator.java')
-rw-r--r--src/cgeo/geocaching/cgCacheInventoryComparator.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/cgeo/geocaching/cgCacheInventoryComparator.java b/src/cgeo/geocaching/cgCacheInventoryComparator.java
deleted file mode 100644
index e58eb43..0000000
--- a/src/cgeo/geocaching/cgCacheInventoryComparator.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package cgeo.geocaching;
-
-import java.util.Comparator;
-import android.util.Log;
-
-/**
- * compares by number of items in inventory
- * @author bananeweizen
- *
- */
-public class cgCacheInventoryComparator implements Comparator<cgCache> {
-
- public int compare(cgCache cache1, cgCache cache2) {
- try {
- int itemCount1 = 0;
- int itemCount2 = 0;
- if (cache1.difficulty != null) {
- itemCount1 = cache1.inventoryItems;
- }
- if (cache2.difficulty != null) {
- itemCount2 = cache2.inventoryItems;
- }
-
- if (itemCount1 < itemCount2) {
- return 1;
- } else if (itemCount2 < itemCount1) {
- return -1;
- } else {
- return 0;
- }
- } catch (Exception e) {
- Log.e(cgSettings.tag, "cgCacheInventoryComparator.compare: " + e.toString());
- }
- return 0;
- }
-}