Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/StaticBedHeightCacheKey.java @ 3651:06a65baae494
merged flys-artifacts/2.9
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:43 +0200 |
parents | 68beaa827751 |
children |
comparison
equal
deleted
inserted
replaced
3549:6a8f83c538e3 | 3651:06a65baae494 |
---|---|
1 package de.intevation.flys.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 : |