comparison flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticBedHeightCacheKey.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/StaticBedHeightCacheKey.java@68beaa827751
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 public class StaticBedHeightCacheKey implements Serializable {
6 public static final String CACHE_NAME = "bedheight-value-table-static";
7
8 private int time;
9 private int height_id;
10
11 public StaticBedHeightCacheKey(int column, int wst_id) {
12 this.height_id = wst_id;
13 this.time = column;
14 }
15
16 public int hashCode() {
17 return (height_id << 8) | time;
18 }
19
20 public boolean equals(Object other) {
21 if (!(other instanceof StaticBedHeightCacheKey)) {
22 return false;
23 }
24 StaticBedHeightCacheKey o = (StaticBedHeightCacheKey) other;
25 return this.height_id == o.height_id && this.time == o.time;
26 }
27 }
28 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org