UnsignedLong.java
4.62 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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
package com.google.common.primitives;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import java.io.Serializable;
import java.math.BigInteger;
import javax.annotation.CheckReturnValue;
import javax.annotation.Nullable;
@GwtCompatible(serializable=true)
public final class UnsignedLong
extends Number
implements Serializable, Comparable<UnsignedLong>
{
public static final UnsignedLong MAX_VALUE = new UnsignedLong(-1L);
public static final UnsignedLong ONE;
public static final UnsignedLong ZERO = new UnsignedLong(0L);
private final long a;
static
{
ONE = new UnsignedLong(1L);
}
private UnsignedLong(long paramLong)
{
this.a = paramLong;
}
public static UnsignedLong fromLongBits(long paramLong)
{
return new UnsignedLong(paramLong);
}
public static UnsignedLong valueOf(long paramLong)
{
if (paramLong >= 0L) {}
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool, "value (%s) is outside the range for an unsigned long value", new Object[] { Long.valueOf(paramLong) });
return fromLongBits(paramLong);
}
}
public static UnsignedLong valueOf(String paramString)
{
return valueOf(paramString, 10);
}
public static UnsignedLong valueOf(String paramString, int paramInt)
{
return fromLongBits(UnsignedLongs.parseUnsignedLong(paramString, paramInt));
}
public static UnsignedLong valueOf(BigInteger paramBigInteger)
{
Preconditions.checkNotNull(paramBigInteger);
if ((paramBigInteger.signum() >= 0) && (paramBigInteger.bitLength() <= 64)) {}
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool, "value (%s) is outside the range for an unsigned long value", new Object[] { paramBigInteger });
return fromLongBits(paramBigInteger.longValue());
}
}
public final BigInteger bigIntegerValue()
{
BigInteger localBigInteger2 = BigInteger.valueOf(this.a & 0x7FFFFFFFFFFFFFFF);
BigInteger localBigInteger1 = localBigInteger2;
if (this.a < 0L) {
localBigInteger1 = localBigInteger2.setBit(63);
}
return localBigInteger1;
}
public final int compareTo(UnsignedLong paramUnsignedLong)
{
Preconditions.checkNotNull(paramUnsignedLong);
return UnsignedLongs.compare(this.a, paramUnsignedLong.a);
}
@CheckReturnValue
public final UnsignedLong dividedBy(UnsignedLong paramUnsignedLong)
{
return fromLongBits(UnsignedLongs.divide(this.a, ((UnsignedLong)Preconditions.checkNotNull(paramUnsignedLong)).a));
}
public final double doubleValue()
{
double d2 = this.a & 0x7FFFFFFFFFFFFFFF;
double d1 = d2;
if (this.a < 0L) {
d1 = d2 + 9.223372036854776E18D;
}
return d1;
}
public final boolean equals(@Nullable Object paramObject)
{
boolean bool2 = false;
boolean bool1 = bool2;
if ((paramObject instanceof UnsignedLong))
{
paramObject = (UnsignedLong)paramObject;
bool1 = bool2;
if (this.a == ((UnsignedLong)paramObject).a) {
bool1 = true;
}
}
return bool1;
}
public final float floatValue()
{
float f2 = (float)(this.a & 0x7FFFFFFFFFFFFFFF);
float f1 = f2;
if (this.a < 0L) {
f1 = f2 + 9.223372E18F;
}
return f1;
}
public final int hashCode()
{
return Longs.hashCode(this.a);
}
public final int intValue()
{
return (int)this.a;
}
public final long longValue()
{
return this.a;
}
public final UnsignedLong minus(UnsignedLong paramUnsignedLong)
{
return fromLongBits(this.a - ((UnsignedLong)Preconditions.checkNotNull(paramUnsignedLong)).a);
}
@CheckReturnValue
public final UnsignedLong mod(UnsignedLong paramUnsignedLong)
{
return fromLongBits(UnsignedLongs.remainder(this.a, ((UnsignedLong)Preconditions.checkNotNull(paramUnsignedLong)).a));
}
public final UnsignedLong plus(UnsignedLong paramUnsignedLong)
{
long l = this.a;
return fromLongBits(((UnsignedLong)Preconditions.checkNotNull(paramUnsignedLong)).a + l);
}
@CheckReturnValue
public final UnsignedLong times(UnsignedLong paramUnsignedLong)
{
long l = this.a;
return fromLongBits(((UnsignedLong)Preconditions.checkNotNull(paramUnsignedLong)).a * l);
}
public final String toString()
{
return UnsignedLongs.toString(this.a);
}
public final String toString(int paramInt)
{
return UnsignedLongs.toString(this.a, paramInt);
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/primitives/UnsignedLong.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/