ingo@1115: /* ingo@1115: * Copyright (c) 2010 by Intevation GmbH ingo@1115: * ingo@1115: * This program is free software under the LGPL (>=v2.1) ingo@1115: * Read the file LGPL.txt coming with the software for details ingo@1115: * or visit http://www.gnu.org/licenses/ if it does not exist. ingo@1115: */ ingo@1115: tim@335: package de.intevation.gnv.state.describedata; tim@335: tim@335: import java.util.ArrayList; tim@335: import java.util.Collection; tim@335: tim@335: /** ingo@809: * This is the default implementation of NamedCollection. ingo@809: * ingo@809: * @param The type which the objects stored in this object are from. sascha@780: * @author Tim Englich tim@335: */ tim@335: public class NamedArrayList extends ArrayList implements tim@335: NamedCollection { tim@335: /** tim@335: * tim@335: */ tim@335: private static final long serialVersionUID = 8172229594749676354L; tim@335: tim@335: private String name = null; tim@335: tim@335: private boolean multiSelect = false; tim@335: tim@335: /** tim@335: * Constructor ingo@809: * ingo@809: * @param name The name of this collection. tim@335: */ tim@335: public NamedArrayList(String name) { tim@335: this.name = name; tim@335: } tim@335: tim@335: /** tim@335: * Constructor sascha@778: * ingo@809: * @param name The name of this collection. ingo@809: * @param initialCapacity The initial capacity of this collection. tim@335: */ tim@335: public NamedArrayList(String name, int initialCapacity) { tim@335: super(initialCapacity); tim@335: this.name = name; tim@335: } tim@335: tim@335: /** tim@335: * Constructor sascha@778: * ingo@809: * @param name The name of this collection. ingo@809: * @param c the collection whose elements are to be placed into this list. tim@335: */ tim@335: public NamedArrayList(String name, Collection c) { tim@335: super(c); tim@335: this.name = name; tim@335: } tim@335: tim@335: public String getName() { tim@335: return this.name; tim@335: } tim@335: tim@335: public boolean isMultiSelect() { tim@335: return multiSelect; tim@335: } tim@335: tim@335: public void setMultiSelect(boolean multiSelect) { tim@335: this.multiSelect = multiSelect; tim@335: } tim@335: } sascha@836: // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :