comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/WstValueTableCacheKey.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/WstValueTableCacheKey.java@305a338c43c2
children
comparison
equal deleted inserted replaced
5830:160f53ee0870 5831:bd047b71ab37
1 package org.dive4elements.river.artifacts.model;
2
3 import java.io.Serializable;
4
5 /**
6 * Cache Key (identifier) for WstValueTables.
7 */
8 public final class WstValueTableCacheKey
9 implements Serializable
10 {
11 public static final String CACHE_NAME = "wst-value-table";
12
13 private int riverId;
14 private int kind;
15
16 public WstValueTableCacheKey(int riverId, int kind) {
17 this.riverId = riverId;
18 this.kind = kind;
19 }
20
21 public int hashCode() {
22 return (riverId << 8) | kind;
23 }
24
25 public boolean equals(Object other) {
26 if (!(other instanceof WstValueTableCacheKey)) {
27 return false;
28 }
29 WstValueTableCacheKey o = (WstValueTableCacheKey)other;
30 return riverId == o.riverId && kind == o.kind;
31 }
32 }
33 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org