|
@@ -6,25 +6,18 @@ |
6 |
6 |
|
{ |
7 |
7 |
|
private static final long serialVersionUID = 1L; |
8 |
8 |
|
|
9 |
|
- |
protected AbstractTimestampHMS( int pOriginalZuluOffsetMins, long pUTC ) |
10 |
|
- |
{ |
11 |
|
- |
super( pOriginalZuluOffsetMins, pUTC ); |
12 |
|
- |
} |
13 |
|
- |
|
14 |
|
- |
protected AbstractTimestampHMS( int pOriginalZuluOffsetMins, UtilDateAdaptor pDateAdaptor ) |
15 |
|
- |
{ |
16 |
|
- |
super( pOriginalZuluOffsetMins, pDateAdaptor ); |
17 |
|
- |
} |
|
9 |
+ |
private final int mSec; |
18 |
10 |
|
|
19 |
|
- |
protected AbstractTimestampHMS( UtilDateAdaptor pDateAdaptor ) |
|
11 |
+ |
protected AbstractTimestampHMS( int pYear, int pMonth, int pDay, int pZuluOffsetMins, int pHour, int pMin, int pSec ) |
20 |
12 |
|
{ |
21 |
|
- |
super( pDateAdaptor ); |
|
13 |
+ |
super( pYear, pMonth, pDay, pZuluOffsetMins, pHour, pMin ); |
|
14 |
+ |
mSec = validateSec( pSec ); |
22 |
15 |
|
} |
23 |
16 |
|
|
24 |
17 |
|
@Override |
25 |
18 |
|
public final int getSec() |
26 |
19 |
|
{ |
27 |
|
- |
return getWall().getSec(); |
|
20 |
+ |
return mSec; |
28 |
21 |
|
} |
29 |
22 |
|
|
30 |
23 |
|
/** |
|
@@ -33,7 +26,7 @@ |
33 |
26 |
|
public final T sec( int pSec ) |
34 |
27 |
|
{ |
35 |
28 |
|
validateSec( pSec ); |
36 |
|
- |
return (getSec() == pSec) ? us() : LLsetSec( pSec ); |
|
29 |
+ |
return (mSec == pSec) ? us() : LLsetSec( pSec ); |
37 |
30 |
|
} |
38 |
31 |
|
|
39 |
32 |
|
/** |
|
@@ -41,7 +34,7 @@ |
41 |
34 |
|
*/ |
42 |
35 |
|
public final T addSecs( int pSecs ) |
43 |
36 |
|
{ |
44 |
|
- |
return (pSecs == 0) ? us() : LLsetSec( getSec() + pSecs ); |
|
37 |
+ |
return (pSecs == 0) ? us() : LLsetSec( mSec + pSecs ); |
45 |
38 |
|
} |
46 |
39 |
|
|
47 |
40 |
|
/** |
|
@@ -49,7 +42,7 @@ |
49 |
42 |
|
*/ |
50 |
43 |
|
public final T minusSecs( int pSecs ) |
51 |
44 |
|
{ |
52 |
|
- |
return (pSecs == 0) ? us() : LLsetSec( getSec() - pSecs ); |
|
45 |
+ |
return (pSecs == 0) ? us() : LLsetSec( mSec - pSecs ); |
53 |
46 |
|
} |
54 |
47 |
|
|
55 |
48 |
|
// vvvvvvvvvvvvvvvvvv Support methods vvvvvvvvvvvvvvvvv |
|
@@ -90,7 +83,7 @@ |
90 |
83 |
|
|
91 |
84 |
|
protected int LL_hashCode() |
92 |
85 |
|
{ |
93 |
|
- |
return hashCodeEm( super.hashCode(), getSec() ); |
|
86 |
+ |
return hashCodeEm( super.hashCode(), mSec ); |
94 |
87 |
|
} |
95 |
88 |
|
|
96 |
89 |
|
/** |
|
@@ -112,7 +105,7 @@ |
112 |
105 |
|
} |
113 |
106 |
|
|
114 |
107 |
|
/** |
115 |
|
- |
* @param pNewSec != current |
|
108 |
+ |
* @param pNewMonth != current |
116 |
109 |
|
*/ |
117 |
110 |
|
protected final T LLsetSec( int pNewSec ) |
118 |
111 |
|
{ |
|
@@ -123,13 +116,13 @@ |
123 |
116 |
|
|
124 |
117 |
|
protected abstract M createMutable( int pYear, int pMonth, int pDay, int pHour, int pMin, int pNewSec ); |
125 |
118 |
|
|
126 |
|
- |
protected static class Mutable extends AbstractTimestampHM.Mutable |
|
119 |
+ |
protected static class Mutable extends AbstractTimestampHM.Mutable implements TimestampAccessorHMS |
127 |
120 |
|
{ |
128 |
121 |
|
protected int mSec; |
129 |
122 |
|
|
130 |
|
- |
public Mutable( int pYear, int pMonth, int pDay, boolean pDayConstrained, int pHour, int pMin, int pSec ) |
|
123 |
+ |
public Mutable( int pYear, int pMonth, int pDay, boolean pDayConstrained, int pZuluOffsetMins, int pHour, int pMin, int pSec ) |
131 |
124 |
|
{ |
132 |
|
- |
super( pYear, pMonth, pDay, pDayConstrained, pHour, pMin ); |
|
125 |
+ |
super( pYear, pMonth, pDay, pDayConstrained, pZuluOffsetMins, pHour, pMin ); |
133 |
126 |
|
mSec = pSec; |
134 |
127 |
|
} |
135 |
128 |
|
|