SignedBytes.java
2.51 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
package com.google.common.primitives;
import com.google.common.annotations.GwtCompatible;
import com.google.common.base.Preconditions;
import java.util.Comparator;
@GwtCompatible
public final class SignedBytes
{
public static final byte MAX_POWER_OF_TWO = 64;
public static byte checkedCast(long paramLong)
{
byte b = (byte)(int)paramLong;
if (b != paramLong) {
throw new IllegalArgumentException(34 + "Out of range: " + paramLong);
}
return b;
}
public static int compare(byte paramByte1, byte paramByte2)
{
return paramByte1 - paramByte2;
}
public static String join(String paramString, byte... paramVarArgs)
{
Preconditions.checkNotNull(paramString);
if (paramVarArgs.length == 0) {
return "";
}
StringBuilder localStringBuilder = new StringBuilder(paramVarArgs.length * 5);
localStringBuilder.append(paramVarArgs[0]);
int i = 1;
while (i < paramVarArgs.length)
{
localStringBuilder.append(paramString).append(paramVarArgs[i]);
i += 1;
}
return localStringBuilder.toString();
}
public static Comparator<byte[]> lexicographicalComparator()
{
return a.a;
}
public static byte max(byte... paramVarArgs)
{
int i = 1;
if (paramVarArgs.length > 0) {}
byte b1;
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool);
byte b2;
for (b1 = paramVarArgs[0]; i < paramVarArgs.length; b1 = b2)
{
b2 = b1;
if (paramVarArgs[i] > b1) {
b2 = paramVarArgs[i];
}
i += 1;
}
}
return b1;
}
public static byte min(byte... paramVarArgs)
{
int i = 1;
if (paramVarArgs.length > 0) {}
byte b1;
for (boolean bool = true;; bool = false)
{
Preconditions.checkArgument(bool);
byte b2;
for (b1 = paramVarArgs[0]; i < paramVarArgs.length; b1 = b2)
{
b2 = b1;
if (paramVarArgs[i] < b1) {
b2 = paramVarArgs[i];
}
i += 1;
}
}
return b1;
}
public static byte saturatedCast(long paramLong)
{
if (paramLong > 127L) {
return Byte.MAX_VALUE;
}
if (paramLong < -128L) {
return Byte.MIN_VALUE;
}
return (byte)(int)paramLong;
}
static enum a
implements Comparator<byte[]>
{
private a() {}
}
}
/* Location: /home/merong/decompile/hackery-dex2jar.jar!/com/google/common/primitives/SignedBytes.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/