AbstractDuration.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
125
126
127
128
129
130
131
132
133
134
135
package org.joda.time.base;
import org.joda.convert.ToString;
import org.joda.time.Duration;
import org.joda.time.Period;
import org.joda.time.ReadableDuration;
import org.joda.time.format.FormatUtils;
public abstract class AbstractDuration
implements ReadableDuration
{
public int compareTo(ReadableDuration paramReadableDuration)
{
long l1 = getMillis();
long l2 = paramReadableDuration.getMillis();
if (l1 < l2) {
return -1;
}
if (l1 > l2) {
return 1;
}
return 0;
}
public boolean equals(Object paramObject)
{
if (this == paramObject) {}
do
{
return true;
if (!(paramObject instanceof ReadableDuration)) {
return false;
}
paramObject = (ReadableDuration)paramObject;
} while (getMillis() == ((ReadableDuration)paramObject).getMillis());
return false;
}
public int hashCode()
{
long l = getMillis();
return (int)(l ^ l >>> 32);
}
public boolean isEqual(ReadableDuration paramReadableDuration)
{
Object localObject = paramReadableDuration;
if (paramReadableDuration == null) {
localObject = Duration.ZERO;
}
return compareTo((ReadableDuration)localObject) == 0;
}
public boolean isLongerThan(ReadableDuration paramReadableDuration)
{
Object localObject = paramReadableDuration;
if (paramReadableDuration == null) {
localObject = Duration.ZERO;
}
return compareTo((ReadableDuration)localObject) > 0;
}
public boolean isShorterThan(ReadableDuration paramReadableDuration)
{
Object localObject = paramReadableDuration;
if (paramReadableDuration == null) {
localObject = Duration.ZERO;
}
return compareTo((ReadableDuration)localObject) < 0;
}
public Duration toDuration()
{
return new Duration(getMillis());
}
public Period toPeriod()
{
return new Period(getMillis());
}
@ToString
public String toString()
{
long l = getMillis();
StringBuffer localStringBuffer = new StringBuffer();
localStringBuffer.append("PT");
int i;
if (l < 0L)
{
i = 1;
FormatUtils.appendUnpaddedInteger(localStringBuffer, l);
label39:
int k = localStringBuffer.length();
if (i == 0) {
break label80;
}
j = 7;
label52:
if (k >= j) {
break label91;
}
if (i == 0) {
break label86;
}
}
label80:
label86:
for (int j = 3;; j = 2)
{
localStringBuffer.insert(j, "0");
break label39;
i = 0;
break;
j = 6;
break label52;
}
label91:
if (l / 1000L * 1000L == l) {
localStringBuffer.setLength(localStringBuffer.length() - 3);
}
for (;;)
{
localStringBuffer.append('S');
return localStringBuffer.toString();
localStringBuffer.insert(localStringBuffer.length() - 3, ".");
}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/org/joda/time/base/AbstractDuration.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/