diff gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedPoint2ds.java @ 480:211cad2fb5ba

Rebased "Horizonalschnitte" to own state class to break from the not well fitting TimeSeriesOutputState. gnv-artifacts/trunk@552 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 17 Jan 2010 12:22:56 +0000
parents
children 823e4f808418
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedPoint2ds.java	Sun Jan 17 12:22:56 2010 +0000
@@ -0,0 +1,46 @@
+package de.intevation.gnv.math;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.util.List;
+
+import java.io.Serializable;
+
+/**
+ *  @author Sascha L. Teichmann (sascha.teichmann@intevation.de)
+ */
+public class AttributedPoint2ds
+implements   Serializable
+{
+    protected List<? extends Point2d> points;
+    protected Map                     attributes;
+
+    public AttributedPoint2ds() {
+    }
+
+    public AttributedPoint2ds(List<? extends Point2d> points) {
+        this.points = points;
+    }
+
+    public Object getAttribute(Object key) {
+        return attributes != null
+            ? attributes.get(key)
+            : null;
+    }
+
+    public void setAttribute(Object key, Object value) {
+        if (attributes == null) {
+            attributes = new HashMap();
+        }
+        attributes.put(key, value);
+    }
+
+    public List<? extends Point2d> getPoints() {
+        return points;
+    }
+
+    public void setPoints(List<? extends Point2d> points) {
+        this.points = points;
+    }
+}
+// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org