Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/GWT/Client/src/org/litesoft/GWT/client/view/Properties.java

Diff revisions: vs.
  @@ -3,56 +3,46 @@
3 3
4 4 import java.util.*;
5 5
6 - public class Properties
7 - {
6 + public class Properties {
8 7 // TODO: possibly replace w/ GWT PrivateMap which is lighter weight
9 8 private Map<String, Object> mMap = new HashMap<String, Object>();
10 9
11 - public Properties()
12 - {
10 + public Properties() {
13 11 this( null );
14 12 }
15 13
16 - public Properties( Properties pCopyFrom )
17 - {
18 - if ( pCopyFrom != null )
19 - {
14 + public Properties( Properties pCopyFrom ) {
15 + if ( pCopyFrom != null ) {
20 16 putAll( pCopyFrom );
21 17 }
22 18 }
23 19
24 - protected Object get( String pName )
25 - {
20 + protected Object get( String pName ) {
26 21 assert pName != null;
27 22 assert pName.length() > 0;
28 23 return mMap.get( pName );
29 24 }
30 25
31 - protected Object set( String pName, Object pValue )
32 - {
26 + protected Object set( String pName, Object pValue ) {
33 27 assert pName != null;
34 28 assert pName.length() > 0;
35 29 return mMap.put( pName, pValue );
36 30 }
37 31
38 - public void replaceAll( Properties pSource )
39 - {
32 + public void replaceAll( Properties pSource ) {
40 33 clear();
41 34 putAll( pSource );
42 35 }
43 36
44 - public void putAll( Properties pSource )
45 - {
37 + public void putAll( Properties pSource ) {
46 38 mMap.putAll( pSource.mMap );
47 39 }
48 40
49 - public void clear()
50 - {
41 + public void clear() {
51 42 mMap.clear();
52 43 }
53 44
54 - public Properties copy()
55 - {
45 + public Properties copy() {
56 46 return new Properties( this );
57 47 }
58 48 }