Files
rr3-apk/decompiled-community/sources/com/google/firebase/remoteconfig/internal/FirebaseRemoteConfigValueImpl.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

80 lines
2.6 KiB
Java

package com.google.firebase.remoteconfig.internal;
import com.google.firebase.remoteconfig.FirebaseRemoteConfigValue;
/* loaded from: classes3.dex */
public class FirebaseRemoteConfigValueImpl implements FirebaseRemoteConfigValue {
public final int source;
public final String value;
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
public int getSource() {
return this.source;
}
public FirebaseRemoteConfigValueImpl(String str, int i) {
this.value = str;
this.source = i;
}
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
public long asLong() {
if (this.source == 0) {
return 0L;
}
String asTrimmedString = asTrimmedString();
try {
return Long.valueOf(asTrimmedString).longValue();
} catch (NumberFormatException e) {
throw new IllegalArgumentException(String.format("[Value: %s] cannot be converted to a %s.", asTrimmedString, "long"), e);
}
}
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
public double asDouble() {
if (this.source == 0) {
return 0.0d;
}
String asTrimmedString = asTrimmedString();
try {
return Double.valueOf(asTrimmedString).doubleValue();
} catch (NumberFormatException e) {
throw new IllegalArgumentException(String.format("[Value: %s] cannot be converted to a %s.", asTrimmedString, "double"), e);
}
}
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
public String asString() {
if (this.source == 0) {
return "";
}
throwIfNullValue();
return this.value;
}
@Override // com.google.firebase.remoteconfig.FirebaseRemoteConfigValue
public boolean asBoolean() {
if (this.source == 0) {
return false;
}
String asTrimmedString = asTrimmedString();
if (ConfigGetParameterHandler.TRUE_REGEX.matcher(asTrimmedString).matches()) {
return true;
}
if (ConfigGetParameterHandler.FALSE_REGEX.matcher(asTrimmedString).matches()) {
return false;
}
throw new IllegalArgumentException(String.format("[Value: %s] cannot be converted to a %s.", asTrimmedString, "boolean"));
}
public final void throwIfNullValue() {
if (this.value == null) {
throw new IllegalArgumentException("Value is null, and cannot be converted to the desired type.");
}
}
public final String asTrimmedString() {
return asString().trim();
}
}