annotate artifact-database/src/main/java/org/dive4elements/artifactdatabase/data/DefaultStateData.java @ 473:d0ac790a6c89 dive4elements-move

Moved directories to org.dive4elements
author Sascha L. Teichmann <teichmann@intevation.de>
date Thu, 25 Apr 2013 10:57:18 +0200
parents artifact-database/src/main/java/de/intevation/artifactdatabase/data/DefaultStateData.java@93a774fe2bb4
children 415df0fc4fa1
rev   line source
110
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
1 /*
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
2 * Copyright (c) 2011 by Intevation GmbH
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
3 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
5 * Read the file LGPL.txt coming with the software for details
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
7 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
8 package de.intevation.artifactdatabase.data;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
9
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
10
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
11 /**
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
12 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
13 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
14 public class DefaultStateData implements StateData {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
15
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
16 /** The name of the data. */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
17 protected String name;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
18
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
19 /** The description of the data. */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
20 protected String description;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
21
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
22 /** The type of the data. */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
23 protected String type;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
24
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
25 /** The value. */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
26 protected Object value;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
27
322
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
28 public DefaultStateData() {
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
29 }
110
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
30
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
31 /**
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
32 * The default constructor. It creates empty StateData objects with no
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
33 * value.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
34 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
35 * @param name The name.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
36 * @param description The description.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
37 * @param type The type.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
38 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
39 public DefaultStateData(String name, String description, String type) {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
40 this.name = name;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
41 this.description = description;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
42 this.type = type;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
43 }
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
44
322
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
45 public void set(StateData other) {
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
46 name = other.getName();
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
47 description = other.getDescription();
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
48 type = other.getType();
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
49 value = other.getValue();
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
50 }
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
51
110
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
52
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
53 /**
200
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
54 * A constructor that takes the name of the data, its value and the
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
55 * describing parameters description and type.
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
56 *
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
57 * @param name The name of the data item.
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
58 * @param description The description.
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
59 * @param type The type.
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
60 * @param value The value of the data item.
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
61 */
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
62 public DefaultStateData(
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
63 String name,
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
64 String description,
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
65 String type,
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
66 String value)
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
67 {
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
68 this.name = name;
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
69 this.description = description;
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
70 this.type = type;
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
71 this.value = value;
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
72 }
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
73
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
74
62dd8438885f Added a further constructor to the DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 110
diff changeset
75 /**
110
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
76 * Returns the name of the data object.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
77 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
78 * @return the name.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
79 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
80 public String getName() {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
81 return name;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
82 }
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
83
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
84
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
85 /**
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
86 * Returns the description of the data object.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
87 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
88 * @return the description of the data object.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
89 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
90 public String getDescription() {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
91 return description;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
92 }
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
93
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
94
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
95 /**
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
96 * Returns the type of the data object as string.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
97 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
98 * @return the type as string.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
99 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
100 public String getType() {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
101 return type;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
102 }
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
103
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
104
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
105 /**
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
106 * Returns the value of the data object.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
107 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
108 * @return the value.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
109 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
110 public Object getValue() {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
111 return value;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
112 }
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
113
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
114
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
115 /**
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
116 * Set the value of this data object.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
117 *
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
118 * @param value The new value for this data object.
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
119 */
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
120 public void setValue(Object value) {
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
121 this.value = value;
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
122 }
322
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
123
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
124 @Override
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
125 public StateData deepCopy() {
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
126 DefaultStateData copy = new DefaultStateData();
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
127 copy.set(this);
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
128 return copy;
93a774fe2bb4 Added deepCopy() method to facets and state data.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 200
diff changeset
129 }
110
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
130 }
33271242e303 Prepared the State and StateData interfaces with methods to add new data to a State and implemented a DefaultStateData class.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
diff changeset
131 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org