Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/state/describedata/DefaultKeyValueDescribeData.java @ 809:d05b17a4f3d0
Added javadoc in describedata package.
gnv-artifacts/trunk@891 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 09 Apr 2010 07:27:38 +0000 |
parents | c4156275c1e1 |
children | 2423cefe7d39 |
comparison
equal
deleted
inserted
replaced
808:2e951160c43d | 809:d05b17a4f3d0 |
---|---|
1 package de.intevation.gnv.state.describedata; | 1 package de.intevation.gnv.state.describedata; |
2 | 2 |
3 /** | 3 /** |
4 * This is the default implementation of <code>KeyValueDescibeData</code>. This | |
5 * class just implements the necessary methods and two constructors. | |
6 * | |
4 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> | 7 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
5 * | |
6 */ | 8 */ |
7 public class DefaultKeyValueDescribeData implements KeyValueDescibeData { | 9 public class DefaultKeyValueDescribeData implements KeyValueDescibeData { |
8 | 10 |
9 /** | |
10 * | |
11 */ | |
12 private static final long serialVersionUID = -924469415242703108L; | 11 private static final long serialVersionUID = -924469415242703108L; |
13 | 12 |
14 private String key; | 13 private String key; |
15 | 14 |
16 private String value = null; | 15 private String value = null; |
17 | 16 |
18 private String state; | 17 private String state; |
19 | 18 |
20 private boolean selected = false; | 19 private boolean selected = false; |
21 | 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 */ | |
22 public DefaultKeyValueDescribeData(String key, String value) { | 28 public DefaultKeyValueDescribeData(String key, String value) { |
23 this(key, value, null); | 29 this(key, value, null); |
24 } | 30 } |
25 | 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 */ | |
26 public DefaultKeyValueDescribeData(String key, String value, String state) { | 40 public DefaultKeyValueDescribeData(String key, String value, String state) { |
27 super(); | 41 super(); |
28 this.key = key; | 42 this.key = key; |
29 this.value = value; | 43 this.value = value; |
30 this.state = state; | 44 this.state = state; |
31 } | 45 } |
32 | 46 |
33 /** | |
34 * @see de.intevation.gnv.state.describedata.KeyValueDescibeData#getKey() | |
35 */ | |
36 public String getKey() { | 47 public String getKey() { |
37 return this.key; | 48 return this.key; |
38 } | 49 } |
39 | 50 |
40 /** | |
41 * @see de.intevation.gnv.state.describedata.KeyValueDescibeData#getValue() | |
42 */ | |
43 public String getValue() { | 51 public String getValue() { |
44 return this.value; | 52 return this.value; |
45 } | 53 } |
46 | 54 |
47 /** | |
48 * @see de.intevation.gnv.state.describedata.KeyValueDescibeData#isSelected() | |
49 */ | |
50 public boolean isSelected() { | 55 public boolean isSelected() { |
51 return this.selected; | 56 return this.selected; |
52 } | 57 } |
53 | 58 |
54 /** | |
55 * @see de.intevation.gnv.state.describedata.KeyValueDescibeData#setSelected(boolean) | |
56 */ | |
57 public void setSelected(boolean selected) { | 59 public void setSelected(boolean selected) { |
58 this.selected = selected; | 60 this.selected = selected; |
59 } | 61 } |
60 | 62 |
61 | |
62 public String getState() { | 63 public String getState() { |
63 return this.state; | 64 return this.state; |
64 } | 65 } |
65 | |
66 } | 66 } |
67 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |