01: package hero.util;
02:
03: public class KeyModelsCache {
04: private String model;
05: private String version;
06: private int hashcode;
07:
08: public KeyModelsCache(String pModel, String pVersion) {
09: model = pModel;
10: version = pVersion;
11: hashcode = model.hashCode() + version.hashCode();
12: }
13:
14: public int hashCode() {
15: return hashcode;
16: }
17:
18: public boolean equals(Object o) {
19: KeyModelsCache other = (KeyModelsCache) o;
20: return (this.model.equals(other.model) && this.version
21: .equals(other.version));
22: }
23: }
|