package com.google.android.gms.internal.ads;

import org.json.JSONObject;

/* JADX INFO: loaded from: classes2.dex */
public final class tn extends un {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ int f16950e;

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public /* synthetic */ tn(String str, Object obj, Object obj2, int i10) {
        super(1, str, obj, obj2);
        this.f16950e = i10;
    }

    @Override // com.google.android.gms.internal.ads.un
    public final Object a(JSONObject jSONObject) {
        int i10 = this.f16950e;
        String str = this.f17336b;
        switch (i10) {
            case 0:
                return Boolean.valueOf(jSONObject.optBoolean(str, ((Boolean) b()).booleanValue()));
            case 1:
                return Integer.valueOf(jSONObject.optInt(str, ((Integer) b()).intValue()));
            case 2:
                return Long.valueOf(jSONObject.optLong(str, ((Long) b()).longValue()));
            case 3:
                return Float.valueOf((float) jSONObject.optDouble(str, ((Float) b()).floatValue()));
            default:
                return jSONObject.optString(str, (String) b());
        }
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public tn(int i10, String str, Boolean bool, Boolean bool2) {
        super(i10, str, bool, bool2);
        this.f16950e = 0;
    }
}
