package L0;

import x0.AbstractC1709a;

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

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public static final n0 f3882d = new n0(new u0.T[0]);

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final C3.W f3884b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public int f3885c;

    static {
        x0.v.G(0);
    }

    public n0(u0.T... tArr) {
        this.f3884b = C3.G.l(tArr);
        this.f3883a = tArr.length;
        int i = 0;
        while (true) {
            C3.W w4 = this.f3884b;
            if (i >= w4.f1227t) {
                return;
            }
            int i5 = i + 1;
            for (int i8 = i5; i8 < w4.f1227t; i8++) {
                if (((u0.T) w4.get(i)).equals(w4.get(i8))) {
                    AbstractC1709a.p("TrackGroupArray", "", new IllegalArgumentException("Multiple identical TrackGroups added to one TrackGroupArray."));
                }
            }
            i = i5;
        }
    }

    public final u0.T a(int i) {
        return (u0.T) this.f3884b.get(i);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || n0.class != obj.getClass()) {
            return false;
        }
        n0 n0Var = (n0) obj;
        return this.f3883a == n0Var.f3883a && this.f3884b.equals(n0Var.f3884b);
    }

    public final int hashCode() {
        if (this.f3885c == 0) {
            this.f3885c = this.f3884b.hashCode();
        }
        return this.f3885c;
    }

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