Subversion Repository Public Repository

litesoft

Diff Revisions 897 vs 898 for /trunk/Java/core/Anywhere/src/org/litesoft/core/simpletypes/temporal/AbstractCalendarYMD.java

Diff revisions: vs.
  @@ -8,27 +8,13 @@
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 -
25 11 /**
26 12 * Return a T with the Day set to the parameter.
27 13 */
28 14 public final T day( int pDay )
29 15 {
30 16 validateDay( getYear(), getMonth(), pDay );
31 - return (mDay == pDay) ? us() : LLsetDay( pDay );
17 + return (getDay() == pDay) ? us() : LLsetDay( pDay );
32 18 }
33 19
34 20 /**
  @@ -36,7 +22,7 @@
36 22 */
37 23 public final T addDays( int pDays )
38 24 {
39 - return (pDays == 0) ? us() : LLsetDay( mDay + pDays );
25 + return (pDays == 0) ? us() : LLsetDay( getDay() + pDays );
40 26 }
41 27
42 28 /**
  @@ -44,7 +30,7 @@
44 30 */
45 31 public final T minusDays( int pDays )
46 32 {
47 - return (pDays == 0) ? us() : LLsetDay( mDay - pDays );
33 + return (pDays == 0) ? us() : LLsetDay( getDay() - pDays );
48 34 }
49 35
50 36 // vvvvvvvvvvvvvvvvvv Support methods vvvvvvvvvvvvvvvvv
  @@ -84,7 +70,7 @@
84 70
85 71 protected int LL_hashCode()
86 72 {
87 - return hashCodeEm( super.hashCode(), mDay );
73 + return hashCodeEm( super.hashCode(), getDay() );
88 74 }
89 75
90 76 /**