comparison flys-client/src/main/java/de/intevation/flys/client/shared/model/AttrList.java @ 813:57ea5af8a967

Meta data service converter: transfer attributes to client, too. flys-client/trunk@2469 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Mon, 08 Aug 2011 15:54:59 +0000
parents
children ffb98b228b3c
comparison
equal deleted inserted replaced
812:70b728a9f4e8 813:57ea5af8a967
1 package de.intevation.flys.client.shared.model;
2
3 import java.util.List;
4 import java.util.ArrayList;
5
6 import java.io.Serializable;
7
8 public class AttrList implements Serializable
9 {
10 protected List<String> keyValues;
11
12 public AttrList() {
13 this(5);
14 }
15
16 public AttrList(int size) {
17 keyValues = new ArrayList<String>(size*2);
18 }
19
20 public int size() {
21 return keyValues != null ? keyValues.size()/2 : null;
22 }
23
24 public String getKey(int index) {
25 return keyValues.get(index/2);
26 }
27
28 public String getValue(int index) {
29 return keyValues.get(index/2 + 1);
30 }
31
32 public void add(String key, String value) {
33 keyValues.add(key);
34 keyValues.add(value);
35 }
36 }
37 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org