litesoft
Diff Revisions
911
vs
912
for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/AbstractCalendarYMD.java
|
@@ -8,13 +8,27 @@ |
8 |
8 |
|
{ |
9 |
9 |
|
private static final long serialVersionUID = 1L; |
10 |
10 |
|
|
|
11 |
+ |
private /* final */ int mDay; |
|
12 |
+ |
|
|
13 |
+ |
protected AbstractCalendarYMD( int pYear, int pMonth, int pDay ) |
|
14 |
+ |
{ |
|
15 |
+ |
super( pYear, pMonth ); |
|
16 |
+ |
mDay = validateDay( getYear(), getMonth(), pDay ); |
|
17 |
+ |
} |
|
18 |
+ |
|
|
19 |
+ |
@Override |
|
20 |
+ |
public final int getDay() |
|
21 |
+ |
{ |
|
22 |
+ |
return mDay; |
|
23 |
+ |
} |
|
24 |
+ |
|
11 |
25 |
|
/** |
12 |
26 |
|
* Return a T with the Day set to the parameter. |
13 |
27 |
|
*/ |
14 |
28 |
|
public final T day( int pDay ) |
15 |
29 |
|
{ |
16 |
30 |
|
validateDay( getYear(), getMonth(), pDay ); |
17 |
|
- |
return (getDay() == pDay) ? us() : LLsetDay( pDay ); |
|
31 |
+ |
return (mDay == pDay) ? us() : LLsetDay( pDay ); |
18 |
32 |
|
} |
19 |
33 |
|
|
20 |
34 |
|
/** |
|
@@ -22,7 +36,7 @@ |
22 |
36 |
|
*/ |
23 |
37 |
|
public final T addDays( int pDays ) |
24 |
38 |
|
{ |
25 |
|
- |
return (pDays == 0) ? us() : LLsetDay( getDay() + pDays ); |
|
39 |
+ |
return (pDays == 0) ? us() : LLsetDay( mDay + pDays ); |
26 |
40 |
|
} |
27 |
41 |
|
|
28 |
42 |
|
/** |
|
@@ -30,7 +44,7 @@ |
30 |
44 |
|
*/ |
31 |
45 |
|
public final T minusDays( int pDays ) |
32 |
46 |
|
{ |
33 |
|
- |
return (pDays == 0) ? us() : LLsetDay( getDay() - pDays ); |
|
47 |
+ |
return (pDays == 0) ? us() : LLsetDay( mDay - pDays ); |
34 |
48 |
|
} |
35 |
49 |
|
|
36 |
50 |
|
// vvvvvvvvvvvvvvvvvv Support methods vvvvvvvvvvvvvvvvv |
|
@@ -70,7 +84,7 @@ |
70 |
84 |
|
|
71 |
85 |
|
protected int LL_hashCode() |
72 |
86 |
|
{ |
73 |
|
- |
return hashCodeEm( super.hashCode(), getDay() ); |
|
87 |
+ |
return hashCodeEm( super.hashCode(), mDay ); |
74 |
88 |
|
} |
75 |
89 |
|
|
76 |
90 |
|
/** |