Subversion Repository Public Repository

litesoft

Diff Revisions 947 vs 948 for /trunk/Java/core/Anywhere/src/org/litesoft/bo/attributes/DisplayWidthInitial.java

Diff revisions: vs.
  @@ -3,28 +3,22 @@
3 3
4 4 import java.util.*;
5 5
6 - public class DisplayWidthInitial implements PropertyOfAMD
7 - {
8 - public static DisplayWidthInitial of( int pLength )
9 - {
6 + public class DisplayWidthInitial implements PropertyOfAMD {
7 + public static DisplayWidthInitial of( int pLength ) {
10 8 return pLength >= 1 ? getInstance( pLength ) : null;
11 9 }
12 10
13 - public static Integer get( AttributeMetaData pAMD )
14 - {
11 + public static Integer get( AttributeMetaData pAMD ) {
15 12 PropertyOfAMD zProperty = pAMD.getProperties().get( MAP_KEY );
16 - if ( zProperty != null )
17 - {
13 + if ( zProperty != null ) {
18 14 return ((DisplayWidthInitial) zProperty).mValue;
19 15 }
20 16 return null;
21 17 }
22 18
23 - private static synchronized DisplayWidthInitial getInstance( int pLength )
24 - {
19 + private static synchronized DisplayWidthInitial getInstance( int pLength ) {
25 20 DisplayWidthInitial zInstance = sInstances.get( pLength );
26 - if ( zInstance == null )
27 - {
21 + if ( zInstance == null ) {
28 22 sInstances.put( pLength, zInstance = new DisplayWidthInitial( pLength ) );
29 23 }
30 24 return zInstance;
  @@ -34,33 +28,28 @@
34 28
35 29 private static final String MAP_KEY = "DisplayWidthInitial";
36 30
37 - private DisplayWidthInitial( int pValue )
38 - {
31 + private DisplayWidthInitial( int pValue ) {
39 32 mValue = pValue;
40 33 }
41 34
42 35 private int mValue;
43 36
44 37 @Override
45 - public String toString()
46 - {
38 + public String toString() {
47 39 return MAP_KEY + ".of( " + mValue + ")";
48 40 }
49 41
50 - public String getMapKey()
51 - {
42 + public String getMapKey() {
52 43 return MAP_KEY;
53 44 }
54 45
55 46 @Override
56 - public boolean equals( Object them )
57 - {
47 + public boolean equals( Object them ) {
58 48 return (this == them) || ((them != null) && (this.getClass() == them.getClass()) && (this.mValue == ((DisplayWidthInitial) them).mValue));
59 49 }
60 50
61 51 @Override
62 - public int hashCode()
63 - {
52 + public int hashCode() {
64 53 return mValue;
65 54 }
66 55 }