Mercurial > dive4elements > gnv-client
view gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java @ 429:bed9735adf84
Finished preprocessing data for interpolation in verticalcrosssection charts.ß
gnv-artifacts/trunk@477 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 22 Dec 2009 17:19:10 +0000 |
parents | a95aaeb206f7 |
children | 422275fc9927 |
line wrap: on
line source
package de.intevation.gnv.math; import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * @author Ingo Weinzierl <ingo.weinzierl@intevation.de> */ public class XYColumn implements Serializable { private double x; private double y; private int i; private int j; private List values; public XYColumn(double x, double y, int i, int j) { this.x = x; this.y = y; this.i = i; this.j = j; } public void add(HeightValue value) { if (values == null) { values = new ArrayList(); } values.add(value); } public HeightValue[] getValues() { return (HeightValue[]) values.toArray(new HeightValue[values.size()]); } public int hashCode() { return (i << 16) | j; } public boolean equals(Object obj) { XYColumn other = (XYColumn) obj; return i == other.i && j == other.j && x == other.x && y == other.y; } }