Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/shared/model/BooleanProperty.java @ 5838:5aa05a7a34b7
Rename modules to more fitting names.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Thu, 25 Apr 2013 15:23:37 +0200 |
parents | flys-client/src/main/java/org/dive4elements/river/client/shared/model/BooleanProperty.java@821a02bbfb4e |
children | 172338b1407f |
comparison
equal
deleted
inserted
replaced
5837:d9901a08d0a6 | 5838:5aa05a7a34b7 |
---|---|
1 package org.dive4elements.river.client.shared.model; | |
2 | |
3 import java.util.HashMap; | |
4 | |
5 /** | |
6 * @author <a href="mailto:raimund.renkert@intevation.de">Raimund Renkert</a> | |
7 */ | |
8 public class BooleanProperty extends PropertySetting { | |
9 | |
10 /** | |
11 * Create a new BooleanProperty for settings. | |
12 */ | |
13 public BooleanProperty() { | |
14 this.attributes = new HashMap<String, String>(); | |
15 } | |
16 | |
17 | |
18 /** | |
19 * Create a new BooleanProperty. | |
20 * @param name The attribute name. | |
21 * @param value The current value. | |
22 */ | |
23 public BooleanProperty( | |
24 String name, | |
25 Boolean value) | |
26 { | |
27 this.name = name; | |
28 this.value = value.toString(); | |
29 this.attributes = new HashMap<String, String>(); | |
30 } | |
31 | |
32 | |
33 @Override | |
34 public Boolean getValue() { | |
35 return Boolean.valueOf(this.value); | |
36 } | |
37 | |
38 | |
39 public void setValue(Boolean value) { | |
40 this.value = value.toString(); | |
41 } | |
42 | |
43 | |
44 public Object clone() { | |
45 BooleanProperty clone = new BooleanProperty(this.getName(), | |
46 this.getValue()); | |
47 for(String s: this.getAttributeList()) { | |
48 clone.setAttribute(s, this.getAttribute(s)); | |
49 } | |
50 return clone; | |
51 } | |
52 | |
53 } |