Subversion Repository Public Repository

litesoft

Diff Revisions 2 vs 49 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/view/Property.java

Diff revisions: vs.
  @@ -1,3 +1,4 @@
1 + // This Source Code is in the Public Domain per: http://litesoft.org/License.txt
1 2 package org.litesoft.GWT.client.view;
2 3
3 4 import org.litesoft.GWT.client.*;
  @@ -7,12 +8,12 @@
7 8 private final Properties mProperties;
8 9 private final String mName;
9 10 private final T mDefault;
10 -
11 +
11 12 public Property(Properties pProperties, String pName)
12 13 {
13 14 this(pProperties, pName, null);
14 15 }
15 -
16 +
16 17 /**
17 18 * @param pProperties non-null
18 19 * @param pName non-null
  @@ -26,24 +27,24 @@
26 27 mName = pName;
27 28 mDefault = pDefault;
28 29 }
29 -
30 +
30 31 public String getName()
31 32 {
32 33 return mName;
33 34 }
34 -
35 +
35 36 @SuppressWarnings("unchecked")
36 37 public T get()
37 38 {
38 39 T value = (T) mProperties.get(getName());
39 40 return (value != null) ? value : mDefault;
40 41 }
41 -
42 +
42 43 public T getDefault()
43 44 {
44 45 return mDefault;
45 46 }
46 -
47 +
47 48 public void set(T pValue)
48 49 {
49 50 mProperties.set(mName, pValue);