comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/DefaultInputData.java @ 1030:c07d9f9a738c

Removed bugs that existed in the caching mechanism (issue264, issue268). gnv-artifacts/trunk@1067 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 06 May 2010 08:32:56 +0000
parents 05bf8534a35a
children f953c9a559d8
comparison
equal deleted inserted replaced
1029:a5e0384fe464 1030:c07d9f9a738c
159 return this.value.split(VALUE_SEPARATOR); 159 return this.value.split(VALUE_SEPARATOR);
160 } 160 }
161 return null; 161 return null;
162 } 162 }
163 163
164 @Override
165 public int hashCode() {
166 logger.debug("*************************************");
167 logger.debug("HashCode name: " + name);
168
169 int hash = 0;
170
171 hash ^= name.hashCode();
172
173 if (value != null) {
174 hash ^= value.hashCode() << 2;
175 }
176
177 if (object != null) {
178 hash ^= object.hashCode() << 4;
179 }
180
181 logger.debug("HashCode value: " + hash);
182 logger.debug("*************************************");
183
184 return hash;
185 }
186
187
188 @Override
189 public boolean equals(Object o) {
190 if (!(o instanceof DefaultInputData))
191 return false;
192
193 DefaultInputData other = (DefaultInputData) o;
194
195 if (!name.equals(other.name))
196 return false;
197
198 if ((value == null) && (other.value == null))
199 return false;
200
201 if (!value.equals(other.value))
202 return false;
203
204 if (!(object == null) && (other.object == null))
205 return false;
206
207 if (!(object == other.object))
208 return false;
209
210 return true;
211 }
164 } 212 }
165 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : 213 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org