Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java @ 431:422275fc9927
Refactored the XYColumn and Point2d code a bit to be more reusable in 3D.
gnv-artifacts/trunk@479 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 23 Dec 2009 06:53:46 +0000 |
parents | bed9735adf84 |
children | 6a70e8883307 |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java Tue Dec 22 20:45:45 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/math/XYColumn.java Wed Dec 23 06:53:46 2009 +0000 @@ -1,32 +1,24 @@ package de.intevation.gnv.math; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; /** * @author Ingo Weinzierl <ingo.weinzierl@intevation.de> + * @author Sascha L. Teichmann <sascha.teichmann@intevation.de> */ public class XYColumn -implements Serializable +extends Point2d { + protected List values; - private double x; - private double y; - - private int i; - private int j; - - private List values; + public XYColumn() { + } public XYColumn(double x, double y, int i, int j) { - this.x = x; - this.y = y; - this.i = i; - this.j = j; + super(x, y, i, j); } - public void add(HeightValue value) { if (values == null) { values = new ArrayList(); @@ -34,20 +26,8 @@ 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; - } } +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: