package defpackage;

import android.util.LongSparseArray;
import android.view.View;
import android.view.ViewGroup;
import java.util.Iterator;
import java.util.NoSuchElementException;

/* renamed from: ˆʕ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public class C0777 implements Iterator, InterfaceC3996 {

    /* renamed from: ᵢˇᵭ, reason: contains not printable characters */
    public int f3675;

    /* renamed from: ᵧᵾˀˈ, reason: contains not printable characters */
    public final /* synthetic */ int f3676;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final Object f3677;

    public /* synthetic */ C0777(int i, Object obj) {
        this.f3676 = i;
        this.f3677 = obj;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        int i = this.f3676;
        Object obj = this.f3677;
        switch (i) {
            case 0:
                if (this.f3675 < ((AbstractC4202) obj).mo4292()) {
                    break;
                }
                break;
            case 1:
                if (this.f3675 < ((Object[]) obj).length) {
                    break;
                }
                break;
            case 2:
                if (this.f3675 < ((LongSparseArray) obj).size()) {
                    break;
                }
                break;
            default:
                if (this.f3675 < ((ViewGroup) obj).getChildCount()) {
                    break;
                }
                break;
        }
        return true;
    }

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f3676;
        Object obj = this.f3677;
        switch (i) {
            case 0:
                if (!hasNext()) {
                    C0190.m1427();
                    return null;
                }
                int i2 = this.f3675;
                this.f3675 = i2 + 1;
                return ((AbstractC4202) obj).get(i2);
            case 1:
                try {
                    int i3 = this.f3675;
                    this.f3675 = i3 + 1;
                    return ((Object[]) obj)[i3];
                } catch (ArrayIndexOutOfBoundsException e) {
                    this.f3675--;
                    throw new NoSuchElementException(e.getMessage());
                }
            case 2:
                int i4 = this.f3675;
                this.f3675 = i4 + 1;
                return Long.valueOf(((LongSparseArray) obj).keyAt(i4));
            default:
                int i5 = this.f3675;
                this.f3675 = i5 + 1;
                View childAt = ((ViewGroup) obj).getChildAt(i5);
                if (childAt != null) {
                    return childAt;
                }
                C0190.m1431();
                return null;
        }
    }

    @Override // java.util.Iterator
    public final void remove() {
        switch (this.f3676) {
            case 0:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 1:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            case 2:
                throw new UnsupportedOperationException("Operation is not supported for read-only collection");
            default:
                ViewGroup viewGroup = (ViewGroup) this.f3677;
                int i = this.f3675 - 1;
                this.f3675 = i;
                viewGroup.removeViewAt(i);
                return;
        }
    }
}
