Mercurial > dive4elements > framework
comparison artifact-database/src/main/java/de/intevation/artifactdatabase/state/DefaultFacet.java @ 322:93a774fe2bb4
Added deepCopy() method to facets and state data.
artifacts/trunk@2530 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 23 Aug 2011 10:54:38 +0000 |
parents | e5bc48dc3ec3 |
children | eb1136134d09 |
comparison
equal
deleted
inserted
replaced
321:ce62ae504d22 | 322:93a774fe2bb4 |
---|---|
25 protected String name; | 25 protected String name; |
26 | 26 |
27 /** The description of this facet.*/ | 27 /** The description of this facet.*/ |
28 protected String description; | 28 protected String description; |
29 | 29 |
30 public DefaultFacet() { | |
31 } | |
30 | 32 |
31 /** | 33 /** |
32 * The default constructor to create new Facet objects. | 34 * The default constructor to create new Facet objects. |
33 * | 35 * |
34 * @param name The name of this new facet. | 36 * @param name The name of this new facet. |
48 */ | 50 */ |
49 public DefaultFacet(int index, String name, String description) { | 51 public DefaultFacet(int index, String name, String description) { |
50 this.index = index; | 52 this.index = index; |
51 this.name = name; | 53 this.name = name; |
52 this.description = description; | 54 this.description = description; |
55 } | |
56 | |
57 public void set(Facet other) { | |
58 index = other.getIndex(); | |
59 name = other.getName(); | |
60 description = other.getDescription(); | |
61 } | |
62 | |
63 public Facet deepCopy() { | |
64 DefaultFacet copy = new DefaultFacet(); | |
65 copy.set(this); | |
66 return copy; | |
53 } | 67 } |
54 | 68 |
55 | 69 |
56 public int getIndex() { | 70 public int getIndex() { |
57 return index; | 71 return index; |