package m0;

import android.os.LocaleList;
import androidx.annotation.IntRange;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.Locale;

/* JADX INFO: loaded from: classes.dex */
public final class h {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public static final h f30286b = new h(new j(new LocaleList(new Locale[0])));

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

    public h(j jVar) {
        this.f30287a = jVar;
    }

    @NonNull
    public static h forLanguageTags(@Nullable String str) {
        if (str == null || str.isEmpty()) {
            return f30286b;
        }
        String[] strArrSplit = str.split(",", -1);
        int length = strArrSplit.length;
        Locale[] localeArr = new Locale[length];
        for (int i10 = 0; i10 < length; i10++) {
            String str2 = strArrSplit[i10];
            int i11 = g.f30285a;
            localeArr[i10] = Locale.forLanguageTag(str2);
        }
        return new h(new j(new LocaleList(localeArr)));
    }

    public final boolean equals(Object obj) {
        if (obj instanceof h) {
            if (this.f30287a.equals(((h) obj).f30287a)) {
                return true;
            }
        }
        return false;
    }

    @Nullable
    public Locale get(int i10) {
        return ((j) this.f30287a).f30288a.get(i10);
    }

    @Nullable
    public Locale getFirstMatch(@NonNull String[] strArr) {
        return ((j) this.f30287a).getFirstMatch(strArr);
    }

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

    @IntRange(from = -1)
    public int indexOf(@Nullable Locale locale) {
        return ((j) this.f30287a).f30288a.indexOf(locale);
    }

    public final String toString() {
        return this.f30287a.toString();
    }

    @Nullable
    public Object unwrap() {
        return this.f30287a.a();
    }
}
