package c.f.j;

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

/* JADX INFO: compiled from: ViewGroup.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public final class f0 implements Iterator<View>, g.h0.c.g0.a {

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public final /* synthetic */ ViewGroup f1418e;

    public f0(ViewGroup viewGroup) {
        this.f1418e = viewGroup;
    }

    @Override // java.util.Iterator
    public boolean hasNext() {
        return this.f1417b < this.f1418e.getChildCount();
    }

    @Override // java.util.Iterator
    public View next() {
        ViewGroup viewGroup = this.f1418e;
        int i2 = this.f1417b;
        this.f1417b = i2 + 1;
        View childAt = viewGroup.getChildAt(i2);
        if (childAt != null) {
            return childAt;
        }
        throw new IndexOutOfBoundsException();
    }

    @Override // java.util.Iterator
    public void remove() {
        ViewGroup viewGroup = this.f1418e;
        int i2 = this.f1417b - 1;
        this.f1417b = i2;
        viewGroup.removeViewAt(i2);
    }
}
