comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/WstValueTableCacheKey.java @ 1190:f514894ec2fd

merged flys-artifacts/2.5
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 28 Sep 2012 12:14:17 +0200
parents 07640ab913fd
children 305a338c43c2
comparison
equal deleted inserted replaced
917:b48c36076e17 1190:f514894ec2fd
1 package de.intevation.flys.artifacts.model;
2
3 import java.io.Serializable;
4
5 public final class WstValueTableCacheKey
6 implements Serializable
7 {
8 public static final String CACHE_NAME = "wst-value-table";
9
10 private int riverId;
11 private int kind;
12
13 public WstValueTableCacheKey(int riverId, int kind) {
14 this.riverId = riverId;
15 this.kind = kind;
16 }
17
18 public int hashCode() {
19 return (riverId << 8) | kind;
20 }
21
22 public boolean equals(Object other) {
23 if (!(other instanceof WstValueTableCacheKey)) {
24 return false;
25 }
26 WstValueTableCacheKey o = (WstValueTableCacheKey)other;
27 return riverId == o.riverId && kind == o.kind;
28 }
29 }
30 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org