RemainderDateTimeField.java
3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package org.joda.time.field;
import org.joda.time.DateTimeField;
import org.joda.time.DateTimeFieldType;
import org.joda.time.DurationField;
public class RemainderDateTimeField
extends DecoratedDateTimeField
{
final int a;
final DurationField b;
public RemainderDateTimeField(DateTimeField paramDateTimeField, DateTimeFieldType paramDateTimeFieldType, int paramInt)
{
super(paramDateTimeField, paramDateTimeFieldType);
if (paramInt < 2) {
throw new IllegalArgumentException("The divisor must be at least 2");
}
paramDateTimeField = paramDateTimeField.getDurationField();
if (paramDateTimeField == null) {}
for (this.b = null;; this.b = new ScaledDurationField(paramDateTimeField, paramDateTimeFieldType.getRangeDurationType(), paramInt))
{
this.a = paramInt;
return;
}
}
public RemainderDateTimeField(DividedDateTimeField paramDividedDateTimeField)
{
this(paramDividedDateTimeField, paramDividedDateTimeField.getType());
}
public RemainderDateTimeField(DividedDateTimeField paramDividedDateTimeField, DateTimeFieldType paramDateTimeFieldType)
{
super(paramDividedDateTimeField.getWrappedField(), paramDateTimeFieldType);
this.a = paramDividedDateTimeField.a;
this.b = paramDividedDateTimeField.b;
}
public long addWrapField(long paramLong, int paramInt)
{
return set(paramLong, FieldUtils.getWrappedValue(get(paramLong), paramInt, 0, this.a - 1));
}
public int get(long paramLong)
{
int i = getWrappedField().get(paramLong);
if (i >= 0) {
return i % this.a;
}
int j = this.a;
return (i + 1) % this.a + (j - 1);
}
public int getDivisor()
{
return this.a;
}
public int getMaximumValue()
{
return this.a - 1;
}
public int getMinimumValue()
{
return 0;
}
public DurationField getRangeDurationField()
{
return this.b;
}
public long remainder(long paramLong)
{
return getWrappedField().remainder(paramLong);
}
public long roundCeiling(long paramLong)
{
return getWrappedField().roundCeiling(paramLong);
}
public long roundFloor(long paramLong)
{
return getWrappedField().roundFloor(paramLong);
}
public long roundHalfCeiling(long paramLong)
{
return getWrappedField().roundHalfCeiling(paramLong);
}
public long roundHalfEven(long paramLong)
{
return getWrappedField().roundHalfEven(paramLong);
}
public long roundHalfFloor(long paramLong)
{
return getWrappedField().roundHalfFloor(paramLong);
}
public long set(long paramLong, int paramInt)
{
FieldUtils.verifyValueBounds(this, paramInt, 0, this.a - 1);
int i = getWrappedField().get(paramLong);
if (i >= 0) {
i /= this.a;
}
for (;;)
{
return getWrappedField().set(paramLong, i * this.a + paramInt);
i = (i + 1) / this.a - 1;
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/org/joda/time/field/RemainderDateTimeField.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/