Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/describedata/DefaultKeyValueDescribeData.java @ 875:5e9efdda6894
merged gnv-artifacts/1.0
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:13:56 +0200 |
parents | 05bf8534a35a |
children | f953c9a559d8 |
comparison
equal
deleted
inserted
replaced
722:bb3ffe7d719e | 875:5e9efdda6894 |
---|---|
1 package de.intevation.gnv.state.describedata; | |
2 | |
3 /** | |
4 * This is the default implementation of <code>KeyValueDescibeData</code>. This | |
5 * class just implements the necessary methods and two constructors. | |
6 * | |
7 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | |
8 */ | |
9 public class DefaultKeyValueDescribeData implements KeyValueDescibeData { | |
10 | |
11 private static final long serialVersionUID = -924469415242703108L; | |
12 | |
13 private String key; | |
14 | |
15 private String value = null; | |
16 | |
17 private String state; | |
18 | |
19 private boolean selected = false; | |
20 | |
21 /** | |
22 * Creates a new instance of this class with a key-value pair, but no state | |
23 * and no selection. | |
24 * | |
25 * @param key The key. | |
26 * @param value A value. | |
27 */ | |
28 public DefaultKeyValueDescribeData(String key, String value) { | |
29 this(key, value, null); | |
30 } | |
31 | |
32 /** | |
33 * Creates a new instance of this class with a key-value pair and the state | |
34 * this object belongs to. | |
35 * | |
36 * @param key The key. | |
37 * @param value A value. | |
38 * @param state A state. | |
39 */ | |
40 public DefaultKeyValueDescribeData(String key, String value, String state) { | |
41 super(); | |
42 this.key = key; | |
43 this.value = value; | |
44 this.state = state; | |
45 } | |
46 | |
47 public String getKey() { | |
48 return this.key; | |
49 } | |
50 | |
51 public String getValue() { | |
52 return this.value; | |
53 } | |
54 | |
55 public boolean isSelected() { | |
56 return this.selected; | |
57 } | |
58 | |
59 public void setSelected(boolean selected) { | |
60 this.selected = selected; | |
61 } | |
62 | |
63 public String getState() { | |
64 return this.state; | |
65 } | |
66 } | |
67 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |