package A2;

import F2.X;
import com.google.crypto.tink.shaded.protobuf.AbstractC0472a;
import com.google.crypto.tink.shaded.protobuf.AbstractC0479h;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public abstract class f {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Class f30a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final Map f31b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final Class f32c;

    public f(Class cls, B2.d... dVarArr) {
        this.f30a = cls;
        HashMap map = new HashMap();
        for (B2.d dVar : dVarArr) {
            boolean zContainsKey = map.containsKey(dVar.f140a);
            Class cls2 = dVar.f140a;
            if (zContainsKey) {
                throw new IllegalArgumentException("KeyTypeManager constructed with duplicate factories for primitive " + cls2.getCanonicalName());
            }
            map.put(cls2, dVar);
        }
        if (dVarArr.length > 0) {
            this.f32c = dVarArr[0].f140a;
        } else {
            this.f32c = Void.class;
        }
        this.f31b = Collections.unmodifiableMap(map);
    }

    public int a() {
        return 1;
    }

    public abstract String b();

    public final Object c(AbstractC0472a abstractC0472a, Class cls) {
        B2.d dVar = (B2.d) this.f31b.get(cls);
        if (dVar != null) {
            return dVar.a(abstractC0472a);
        }
        throw new IllegalArgumentException("Requested primitive class " + cls.getCanonicalName() + " not supported.");
    }

    public abstract e d();

    public abstract X e();

    public abstract AbstractC0472a f(AbstractC0479h abstractC0479h);

    public abstract void g(AbstractC0472a abstractC0472a);
}
