Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedXYColumns.java @ 432:6a70e8883307
Added some type safety. Fixed z value bug in reading database preprocessing. Only dissemble WKT points if really needed.
gnv-artifacts/trunk@480 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 23 Dec 2009 09:45:40 +0000 |
parents | bed9735adf84 |
children | 828df3ddb758 |
comparison
equal
deleted
inserted
replaced
431:422275fc9927 | 432:6a70e8883307 |
---|---|
1 package de.intevation.gnv.math; | 1 package de.intevation.gnv.math; |
2 | 2 |
3 import java.util.Map; | 3 import java.util.Map; |
4 import java.util.HashMap; | 4 import java.util.HashMap; |
5 import java.util.List; | |
6 | |
5 import java.io.Serializable; | 7 import java.io.Serializable; |
6 | 8 |
7 public class AttributedXYColumns | 9 public class AttributedXYColumns |
8 implements Serializable | 10 implements Serializable |
9 { | 11 { |
10 protected XYColumn[] columns; | 12 protected List<? extends XYColumn> columns; |
11 protected Map attributes; | 13 protected Map attributes; |
12 | 14 |
13 public AttributedXYColumns() { | 15 public AttributedXYColumns() { |
14 } | 16 } |
15 | 17 |
16 public AttributedXYColumns(XYColumn[] columns) { | 18 public AttributedXYColumns(List<? extends XYColumn> columns) { |
17 this(columns, null); | 19 this(columns, null); |
18 } | 20 } |
19 | 21 |
20 public AttributedXYColumns(XYColumn[] columns, Map attributes) { | 22 public AttributedXYColumns(List<? extends XYColumn> columns, Map attributes) { |
21 this.columns = columns; | 23 this.columns = columns; |
22 this.attributes = attributes; | 24 this.attributes = attributes; |
23 } | 25 } |
24 | 26 |
25 public Object getAttribute(Object key) { | 27 public Object getAttribute(Object key) { |
26 return attributes.get(key); | 28 return attributes.get(key); |
27 } | 29 } |
28 | 30 |
29 public void setAttribute(Object key, Object value) { | 31 public void setAttribute(Object key, Object value) { |
30 if (attributes == null) | 32 if (attributes == null) { |
31 attributes = new HashMap(); | 33 attributes = new HashMap(); |
34 } | |
32 | 35 |
33 attributes.put(key, value); | 36 attributes.put(key, value); |
34 } | 37 } |
35 | 38 |
36 public XYColumn[] getXYColumns() { | 39 public List<? extends XYColumn> getXYColumns() { |
37 return columns; | 40 return columns; |
38 } | 41 } |
39 | 42 |
40 public void setXYColumns(XYColumn[] columns) { | 43 public void setXYColumns(List<? extends XYColumn> columns) { |
41 this.columns = columns; | 44 this.columns = columns; |
42 } | 45 } |
43 } | 46 } |
47 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8: |