comparison artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticBedHeightCacheKey.java @ 5838:5aa05a7a34b7

Rename modules to more fitting names.
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 15:23:37 +0200
parents flys-artifacts/src/main/java/org/dive4elements/river/artifacts/model/StaticBedHeightCacheKey.java@bd047b71ab37
children 4897a58c8746
comparison
equal deleted inserted replaced
5837:d9901a08d0a6 5838:5aa05a7a34b7
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