comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTableCacheKey.java @ 626:e3ee131d5dd3

Moved WST value table cache key to a separate class. flys-artifacts/trunk@1991 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 24 May 2011 11:23:57 +0000
parents
children 07640ab913fd
comparison
equal deleted inserted replaced
625:c0c60a611fca 626:e3ee131d5dd3
1 package de.intevation.flys.artifacts.model;
2
3 import java.io.Serializable;
4
5 public final class WstValueTableCacheKey
6 implements Serializable
7 {
8 private int riverId;
9 private int kind;
10
11 public WstValueTableCacheKey(int riverId, int kind) {
12 this.riverId = riverId;
13 this.kind = kind;
14 }
15
16 public int hashCode() {
17 return (riverId << 8) | kind;
18 }
19
20 public boolean equals(Object other) {
21 if (!(other instanceof WstValueTableCacheKey)) {
22 return false;
23 }
24 WstValueTableCacheKey o = (WstValueTableCacheKey)other;
25 return riverId == o.riverId && kind == o.kind;
26 }
27 }
28 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org