Subversion Repository Public Repository

litesoft

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

Diff revisions: vs.
  @@ -7,18 +7,25 @@
7 7 {
8 8 private static final long serialVersionUID = 1L;
9 9
10 - private /* final */ int mMin;
10 + protected AbstractTimestampHM( int pOriginalZuluOffsetMins, long pUTC )
11 + {
12 + super( pOriginalZuluOffsetMins, pUTC );
13 + }
14 +
15 + protected AbstractTimestampHM( int pOriginalZuluOffsetMins, UtilDateAdaptor pDateAdaptor )
16 + {
17 + super( pOriginalZuluOffsetMins, pDateAdaptor );
18 + }
11 19
12 - protected AbstractTimestampHM( int pYear, int pMonth, int pDay, int pZuluOffsetMins, int pHour, int pMin )
20 + protected AbstractTimestampHM( UtilDateAdaptor pDateAdaptor )
13 21 {
14 - super( pYear, pMonth, pDay, pZuluOffsetMins, pHour );
15 - mMin = validateMin( pMin );
22 + super( pDateAdaptor );
16 23 }
17 24
18 25 @Override
19 26 public final int getMin()
20 27 {
21 - return mMin;
28 + return getWall().getMin();
22 29 }
23 30
24 31 /**
  @@ -27,7 +34,7 @@
27 34 public final T min( int pMin )
28 35 {
29 36 validateMin( pMin );
30 - return (mMin == pMin) ? us() : LLsetMin( pMin );
37 + return (getMin() == pMin) ? us() : LLsetMin( pMin );
31 38 }
32 39
33 40 /**
  @@ -35,7 +42,7 @@
35 42 */
36 43 public final T addMins( int pMins )
37 44 {
38 - return (pMins == 0) ? us() : LLsetMin( mMin + pMins );
45 + return (pMins == 0) ? us() : LLsetMin( getMin() + pMins );
39 46 }
40 47
41 48 /**
  @@ -43,7 +50,7 @@
43 50 */
44 51 public final T minusMins( int pMins )
45 52 {
46 - return (pMins == 0) ? us() : LLsetMin( mMin - pMins );
53 + return (pMins == 0) ? us() : LLsetMin( getMin() - pMins );
47 54 }
48 55
49 56 // vvvvvvvvvvvvvvvvvv Support methods vvvvvvvvvvvvvvvvv
  @@ -84,7 +91,7 @@
84 91
85 92 protected int LL_hashCode()
86 93 {
87 - return hashCodeEm( super.hashCode(), mMin );
94 + return hashCodeEm( super.hashCode(), getMin() );
88 95 }
89 96
90 97 /**
  @@ -106,7 +113,7 @@
106 113 }
107 114
108 115 /**
109 - * @param pNewMonth != current
116 + * @param pNewMin != current
110 117 */
111 118 protected final T LLsetMin( int pNewMin )
112 119 {
  @@ -117,13 +124,13 @@
117 124
118 125 protected abstract M createMutable( int pYear, int pMonth, int pDay, int pHour, int pNewMin );
119 126
120 - protected static class Mutable extends AbstractTimestampH.Mutable implements TimestampAccessorHM
127 + protected static class Mutable extends AbstractTimestampH.Mutable
121 128 {
122 129 protected int mMin;
123 130
124 - public Mutable( int pYear, int pMonth, int pDay, boolean pDayConstrained, int pZuluOffsetMins, int pHour, int pMin )
131 + public Mutable( int pYear, int pMonth, int pDay, boolean pDayConstrained, int pHour, int pMin )
125 132 {
126 - super( pYear, pMonth, pDay, pDayConstrained, pZuluOffsetMins, pHour );
133 + super( pYear, pMonth, pDay, pDayConstrained, pHour );
127 134 mMin = pMin;
128 135 }
129 136
  @@ -174,11 +181,11 @@
174 181 }
175 182
176 183 @Override
177 - protected final void adjustMinutesTo( int pOffsetMinsAdjustment )
184 + public final void adjustOrigWallToZulu( int pOffsetMinsAdjustment )
178 185 {
179 186 if ( pOffsetMinsAdjustment != 0 )
180 187 {
181 - mMin += pOffsetMinsAdjustment;
188 + mMin -= pOffsetMinsAdjustment;
182 189 normalize();
183 190 }
184 191 }