Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/flys/importer/WstColumnValueKey.java @ 492:14de9246b356
Importer: parse historical discharge tables, too. TODO: store them in database.
flys-backend/trunk@1840 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 05 May 2011 15:25:16 +0000 |
parents | db430bd9e0e0 |
children |
line wrap: on
line source
package de.intevation.flys.importer; import de.intevation.flys.model.WstColumnValue; public class WstColumnValueKey { protected int wstColumnId; protected double position; protected double w; public WstColumnValueKey(WstColumnValue value) { this.wstColumnId = value.getWstColumn().getId(); this.position = value.getPosition().doubleValue(); this.w = value.getW().doubleValue(); } public WstColumnValueKey(int wstColumnId, double position, double w) { this.wstColumnId = wstColumnId; this.position = position; this.w = w; } public int hashCode() { int a = new Integer(wstColumnId).hashCode(); int b = new Double(position).hashCode(); int c = new Double(w).hashCode(); return (a ^ (b << 3) ^ (c << 6)); } public boolean equals(Object obj) { if (!(obj instanceof WstColumnValueKey)) { return false; } WstColumnValueKey other = (WstColumnValueKey) obj; if (this.wstColumnId != other.wstColumnId) { return false; } else if (this.position != other.position) { return false; } else if (this.w != other.w) { return false; } return true; } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :