package androidx.navigation;

import android.os.Bundle;
import android.os.Parcelable;
import com.revenuecat.purchases.subscriberattributes.SubscriberAttributeKt;
import x4.AbstractC3250p;

/* JADX INFO: loaded from: classes.dex */
public final class P extends U {

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

    public P(Class cls) {
        super(true);
        if (!Parcelable.class.isAssignableFrom(cls)) {
            throw new IllegalArgumentException((cls + " does not implement Parcelable.").toString());
        }
        try {
            this.f12716k = Class.forName("[L" + cls.getName() + ';');
        } catch (ClassNotFoundException e6) {
            throw new RuntimeException(e6);
        }
    }

    @Override // androidx.navigation.U
    public final Object a(Bundle bundle, String str) {
        return (Parcelable[]) Z0.o.h(bundle, "bundle", str, SubscriberAttributeKt.JSON_NAME_KEY, str);
    }

    @Override // androidx.navigation.U
    public final String b() {
        return this.f12716k.getName();
    }

    @Override // androidx.navigation.U
    public final Object d(String str) {
        throw new UnsupportedOperationException("Arrays don't support default values.");
    }

    @Override // androidx.navigation.U
    public final void e(Bundle bundle, String key, Object obj) {
        Parcelable[] parcelableArr = (Parcelable[]) obj;
        kotlin.jvm.internal.o.h(key, "key");
        this.f12716k.cast(parcelableArr);
        bundle.putParcelableArray(key, parcelableArr);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || !P.class.equals(obj.getClass())) {
            return false;
        }
        return kotlin.jvm.internal.o.c(this.f12716k, ((P) obj).f12716k);
    }

    @Override // androidx.navigation.U
    public final boolean f(Object obj, Object obj2) {
        return AbstractC3250p.w((Parcelable[]) obj, (Parcelable[]) obj2);
    }

    public final int hashCode() {
        return this.f12716k.hashCode();
    }
}
