aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo/geocaching/cgCache.java
diff options
context:
space:
mode:
authorMarco Jacob <mjacob@union06.de>2012-01-25 21:47:44 +0100
committerMarco Jacob <mjacob@union06.de>2012-01-25 21:47:44 +0100
commit4c787164a8b4ccfdb754858f76e18440aecc03ff (patch)
tree2dd01b57963a1a283af599f1c1fa1acf41515221 /main/src/cgeo/geocaching/cgCache.java
parentf20f7bc3fabac198248fa3047014890aba81df14 (diff)
parent6dea5724d4115e98c3b10524e9edc6c0017d24b3 (diff)
downloadcgeo-4c787164a8b4ccfdb754858f76e18440aecc03ff.zip
cgeo-4c787164a8b4ccfdb754858f76e18440aecc03ff.tar.gz
cgeo-4c787164a8b4ccfdb754858f76e18440aecc03ff.tar.bz2
Merge branch 'master' into issue#290
Diffstat (limited to 'main/src/cgeo/geocaching/cgCache.java')
-rw-r--r--main/src/cgeo/geocaching/cgCache.java19
1 files changed, 19 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/cgCache.java b/main/src/cgeo/geocaching/cgCache.java
index 933b0ad..edabc0c 100644
--- a/main/src/cgeo/geocaching/cgCache.java
+++ b/main/src/cgeo/geocaching/cgCache.java
@@ -1234,4 +1234,23 @@ public class cgCache implements ICache {
public String toString() {
return this.geocode + " " + this.name;
}
+
+ @Override
+ public int hashCode() {
+ return geocode.hashCode() * name.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (this == obj) {
+ return true;
+ }
+ if (obj == null) {
+ return false;
+ }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
+ return isEqualTo((cgCache) obj);
+ }
}