Mercurial > dive4elements > gnv-client
annotate gnv-artifacts/src/main/java/de/intevation/gnv/transition/describedata/NamedArrayList.java @ 79:e33c61735a4e
Implementation of the Static UI done
gnv-artifacts/trunk@101 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Thu, 17 Sep 2009 13:38:12 +0000 |
parents | |
children | 7fb9441dd8af |
rev | line source |
---|---|
79
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 * |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
3 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
4 package de.intevation.gnv.transition.describedata; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
5 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
6 import java.util.ArrayList; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
7 import java.util.Collection; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
8 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
9 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
10 * @author Tim Englich <tim.englich@intevation.de> |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
11 * |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
12 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
13 public class NamedArrayList<E> extends ArrayList<E> implements NamedCollection<E> { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
15 * |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 private static final long serialVersionUID = 8172229594749676354L; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 private String name = null; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 private boolean multiSelect = false; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
23 * Constructor |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
24 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 public NamedArrayList(String name) { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 this.name = name; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 } |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
30 * Constructor |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
31 * @param initialCapacity |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
32 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
33 public NamedArrayList(String name, int initialCapacity) { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
34 super(initialCapacity); |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 this.name = name; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 } |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
39 * Constructor |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
40 * @param c |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
41 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
42 public NamedArrayList(String name, Collection<E> c) { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
43 super(c); |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 this.name = name; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 } |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 * @see de.intevation.gnv.transition.describedata.NamedCollection#getName() |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
50 public String getName() { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 return this.name; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 } |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
53 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
54 * @see de.intevation.gnv.transition.describedata.NamedCollection#isMultiSelect() |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
55 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
56 public boolean isMultiSelect() { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
57 return multiSelect; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
58 } |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
59 |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 /** |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
61 * @see de.intevation.gnv.transition.describedata.NamedCollection#setMultiSelect(boolean) |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
62 */ |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
63 public void setMultiSelect(boolean multiSelect) { |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
64 this.multiSelect = multiSelect; |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
65 } |
e33c61735a4e
Implementation of the Static UI done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
66 } |