view flys-client/src/main/java/de/intevation/flys/client/shared/model/AttrList.java @ 5503:b660090b417d

Create a new sq relation project on measurement station record click. * Added new methods to artifact service. * Added new client-side artifact. * Updated UI to have a new row in 'Messstellen-Info'.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 28 Mar 2013 15:21:15 +0100
parents ffb98b228b3c
children
line wrap: on
line source
package de.intevation.flys.client.shared.model;

import java.util.List;
import java.util.ArrayList;

import java.io.Serializable;

public class AttrList implements Serializable
{
    protected List<String> keyValues;

    public AttrList() {
        this(5);
    }

    public AttrList(int size) {
        keyValues = new ArrayList<String>(size*2);
    }

    public int size() {
        return keyValues != null ? keyValues.size()/2 : null;
    }

    public String getKey(int index) {
        return keyValues.get(index*2);
    }

    public String getValue(int index) {
        return keyValues.get(index*2 + 1);
    }

    public void add(String key, String value) {
        keyValues.add(key);
        keyValues.add(value);
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org