package com.google.android.gms.internal.ads;

import java.util.ListIterator;
import java.util.NoSuchElementException;

/* JADX INFO: loaded from: classes2.dex */
public abstract class yq1 extends ct1 implements ListIterator {

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

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

    public yq1(int i10, int i11) {
        super(0);
        ih1.s1(i11, i10);
        this.f18965b = i10;
        this.f18966c = i11;
    }

    public final void a(Object obj) {
        throw new UnsupportedOperationException();
    }

    @Override // java.util.ListIterator
    public final /* bridge */ /* synthetic */ void add(Object obj) {
        a(obj);
        throw null;
    }

    public final void b(Object obj) {
        throw new UnsupportedOperationException();
    }

    public abstract Object c(int i10);

    @Override // java.util.Iterator, java.util.ListIterator
    public final boolean hasNext() {
        return this.f18966c < this.f18965b;
    }

    @Override // java.util.ListIterator
    public final boolean hasPrevious() {
        return this.f18966c > 0;
    }

    @Override // com.google.android.gms.internal.ads.ct1, java.util.Iterator
    public final Object next() {
        if (!hasNext()) {
            throw new NoSuchElementException();
        }
        int i10 = this.f18966c;
        this.f18966c = i10 + 1;
        return c(i10);
    }

    @Override // java.util.ListIterator
    public final int nextIndex() {
        return this.f18966c;
    }

    @Override // java.util.ListIterator
    public final Object previous() {
        if (!hasPrevious()) {
            throw new NoSuchElementException();
        }
        int i10 = this.f18966c - 1;
        this.f18966c = i10;
        return c(i10);
    }

    @Override // java.util.ListIterator
    public final int previousIndex() {
        return this.f18966c - 1;
    }

    @Override // java.util.ListIterator
    public final /* bridge */ /* synthetic */ void set(Object obj) {
        b(obj);
        throw null;
    }
}
