Mercurial > dive4elements > gnv-client
view 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 source
package de.intevation.gnv.math; 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 extends Point2d { protected List values; public XYColumn() { } public XYColumn(double x, double y, int i, int j) { super(x, y, i, 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()]); } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: