comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/StaticHWSCacheKey.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/map/StaticHWSCacheKey.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
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