view flys-client/src/main/java/de/intevation/flys/client/shared/model/DataCageNode.java @ 840:18fc7afe0251

Ensure list of recommendations is non-null after construction of DefaultCollection. flys-client/trunk@2560 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Felix Wolfsteller <felix.wolfsteller@intevation.de>
date Wed, 24 Aug 2011 13:17:22 +0000
parents 57ea5af8a967
children 63b258bf365c
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 DataCageNode implements Serializable
{
    protected String             name;
    protected List<DataCageNode> children;
    protected AttrList           attrs;

    public DataCageNode() {
    }

    public DataCageNode(String name) {
        this(name, null);
    }

    public DataCageNode(String name, AttrList attrs) {
        this.name  = name;
        this.attrs = attrs;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void addChild(DataCageNode child) {
        if (children == null) {
            children = new ArrayList<DataCageNode>();
        }
        children.add(child);
    }

    public List<DataCageNode> getChildren() {
        return children;
    }

    public AttrList getAttributes() {
        return attrs;
    }
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org