litesoft
Diff Revisions
49
vs
849
for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/PointXY.java
|
@@ -8,13 +8,13 @@ |
8 |
8 |
|
*/ |
9 |
9 |
|
public class PointXY extends AbstractXY<PointXY> |
10 |
10 |
|
{ |
|
11 |
+ |
private static final long serialVersionUID = 1L; |
|
12 |
+ |
|
11 |
13 |
|
public static final PointXY ZERO_ZERO = new PointXY( 0, 0 ); |
12 |
14 |
|
|
13 |
15 |
|
private static final String WHAT = "Point"; |
14 |
16 |
|
|
15 |
|
- |
/** |
16 |
|
- |
* @deprecated - for Serialization |
17 |
|
- |
*/ |
|
17 |
+ |
@SuppressWarnings({"deprecation", "UnusedDeclaration"}) @Deprecated /** for Serialization */ |
18 |
18 |
|
protected PointXY() |
19 |
19 |
|
{ |
20 |
20 |
|
} |
|
@@ -27,19 +27,25 @@ |
27 |
27 |
|
public static PointXY fromString( String pToString ) |
28 |
28 |
|
throws IllegalArgumentException |
29 |
29 |
|
{ |
30 |
|
- |
PointXY zXY = new PointXY( 0, 0 ); |
31 |
|
- |
populate( WHAT, zXY, pToString ); |
32 |
|
- |
return zXY; |
|
30 |
+ |
return ZERO_ZERO.copyParse( WHAT, pToString ); |
33 |
31 |
|
} |
34 |
32 |
|
|
|
33 |
+ |
@Override |
35 |
34 |
|
public boolean equals( Object o ) |
36 |
35 |
|
{ |
37 |
36 |
|
return (this == o) || // |
38 |
37 |
|
((o instanceof PointXY) && LLequals( (PointXY) o )); |
39 |
38 |
|
} |
40 |
39 |
|
|
|
40 |
+ |
@Override |
41 |
41 |
|
protected int validate( String pWhat, int pValue ) |
42 |
42 |
|
{ |
43 |
43 |
|
return pValue; |
44 |
44 |
|
} |
|
45 |
+ |
|
|
46 |
+ |
@Override |
|
47 |
+ |
protected AbstractXY clone( int pX, int pY ) |
|
48 |
+ |
{ |
|
49 |
+ |
return new PointXY( pX, pY ); |
|
50 |
+ |
} |
45 |
51 |
|
} |