mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-27 17:42:33 -06:00
33 lines
947 B
Java
33 lines
947 B
Java
package com.google.common.primitives;
|
|
|
|
@ElementTypesAreNonnullByDefault
|
|
/* loaded from: classes3.dex */
|
|
final class ParseRequest {
|
|
final int radix;
|
|
final String rawValue;
|
|
|
|
private ParseRequest(String str, int i) {
|
|
this.rawValue = str;
|
|
this.radix = i;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static ParseRequest fromString(String str) {
|
|
if (str.length() == 0) {
|
|
throw new NumberFormatException("empty string");
|
|
}
|
|
char charAt = str.charAt(0);
|
|
int i = 16;
|
|
if (str.startsWith("0x") || str.startsWith("0X")) {
|
|
str = str.substring(2);
|
|
} else if (charAt == '#') {
|
|
str = str.substring(1);
|
|
} else if (charAt != '0' || str.length() <= 1) {
|
|
i = 10;
|
|
} else {
|
|
str = str.substring(1);
|
|
i = 8;
|
|
}
|
|
return new ParseRequest(str, i);
|
|
}
|
|
}
|