Mercurial > dive4elements > river
view flys-backend/src/main/java/de/intevation/flys/importer/WstColumnValueKey.java @ 485:6b231041dc18
Importer: Try to extract time ranges from at files.
flys-backend/trunk@1811 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 03 May 2011 17:09:38 +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 :