Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/describedata/DefaultKeyValueDescribeData.java @ 1119:7c4f81f74c47
merged gnv-artifacts
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:00 +0200 |
parents | f953c9a559d8 |
children |
comparison
equal
deleted
inserted
replaced
1027:fca4b5eb8d2f | 1119:7c4f81f74c47 |
---|---|
1 /* | |
2 * Copyright (c) 2010 by Intevation GmbH | |
3 * | |
4 * This program is free software under the LGPL (>=v2.1) | |
5 * Read the file LGPL.txt coming with the software for details | |
6 * or visit http://www.gnu.org/licenses/ if it does not exist. | |
7 */ | |
8 | |
9 package de.intevation.gnv.state.describedata; | |
10 | |
11 /** | |
12 * This is the default implementation of <code>KeyValueDescibeData</code>. This | |
13 * class just implements the necessary methods and two constructors. | |
14 * | |
15 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | |
16 */ | |
17 public class DefaultKeyValueDescribeData implements KeyValueDescibeData { | |
18 | |
19 private static final long serialVersionUID = -924469415242703108L; | |
20 | |
21 private String key; | |
22 | |
23 private String value = null; | |
24 | |
25 private String state; | |
26 | |
27 private boolean selected = false; | |
28 | |
29 /** | |
30 * Creates a new instance of this class with a key-value pair, but no state | |
31 * and no selection. | |
32 * | |
33 * @param key The key. | |
34 * @param value A value. | |
35 */ | |
36 public DefaultKeyValueDescribeData(String key, String value) { | |
37 this(key, value, null); | |
38 } | |
39 | |
40 /** | |
41 * Creates a new instance of this class with a key-value pair and the state | |
42 * this object belongs to. | |
43 * | |
44 * @param key The key. | |
45 * @param value A value. | |
46 * @param state A state. | |
47 */ | |
48 public DefaultKeyValueDescribeData(String key, String value, String state) { | |
49 super(); | |
50 this.key = key; | |
51 this.value = value; | |
52 this.state = state; | |
53 } | |
54 | |
55 public String getKey() { | |
56 return this.key; | |
57 } | |
58 | |
59 public String getValue() { | |
60 return this.value; | |
61 } | |
62 | |
63 public boolean isSelected() { | |
64 return this.selected; | |
65 } | |
66 | |
67 public void setSelected(boolean selected) { | |
68 this.selected = selected; | |
69 } | |
70 | |
71 public String getState() { | |
72 return this.state; | |
73 } | |
74 } | |
75 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |