Mercurial > dive4elements > river
diff flys-backend/src/main/java/de/intevation/flys/importer/IdValueKey.java @ 501:04d449f7f0c9
Importer: Change caching strategy not to cause OOM any more.
flys-backend/trunk@1855 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 09 May 2011 00:15:45 +0000 |
parents | d50cd3a632e0 |
children |
line wrap: on
line diff
--- a/flys-backend/src/main/java/de/intevation/flys/importer/IdValueKey.java Sun May 08 22:41:07 2011 +0000 +++ b/flys-backend/src/main/java/de/intevation/flys/importer/IdValueKey.java Mon May 09 00:15:45 2011 +0000 @@ -42,11 +42,12 @@ return d != null ? d.hashCode() : 0; } + @Override public int hashCode() { return id | (hashCode(a) << 10) | (hashCode(b) << 20); } - + @Override public boolean equals(Object obj) { if (!(obj instanceof IdValueKey)) { return false; @@ -57,10 +58,10 @@ return !((id != other.id) || (a == null && other.a != null) || (a != null && other.a == null) - || (a != null && !a.equals(other)) + || (a != null && !a.equals(other.a)) || (b == null && other.b != null) || (b != null && other.b == null) - || (b != null && !b.equals(other))); + || (b != null && !b.equals(other.b))); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :