comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/StaticHWSCacheKey.java @ 5831:bd047b71ab37

Repaired internal references
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 12:06:39 +0200
parents flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/map/StaticHWSCacheKey.java@ac2746f3e75f
children
comparison
equal deleted inserted replaced
5830:160f53ee0870 5831:bd047b71ab37
1 package org.dive4elements.river.artifacts.model.map;
2
3
4 public class StaticHWSCacheKey
5 {
6 public static final String CACHE_NAME = "hws-value-table-static";
7
8 private String river;
9 private int type;
10
11 public StaticHWSCacheKey(String river, int type) {
12 this.river = river;
13 this.type = type;
14 }
15
16 public int hashCode() {
17 return river.hashCode() | (type << 8);
18 }
19
20 public boolean equals(Object other) {
21 if (!(other instanceof StaticHWSCacheKey)) {
22 return false;
23 }
24 StaticHWSCacheKey o = (StaticHWSCacheKey) other;
25 return this.river == o.river;
26 }
27 }

http://dive4elements.wald.intevation.org