package defpackage;

import java.util.AbstractList;
import java.util.ConcurrentModificationException;
import java.util.ListIterator;

/* JADX INFO: renamed from: ᵶᵵ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C4848 implements ListIterator, InterfaceC5238 {

    /* JADX INFO: renamed from: ˌᴵ, reason: contains not printable characters */
    public final /* synthetic */ int f18502 = 1;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public int f18503 = -1;

    /* JADX INFO: renamed from: ᵜᵪʾ, reason: contains not printable characters */
    public int f18504;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public int f18505;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final AbstractC5474 f18506;

    public C4848(C0970 c0970, int i) {
        this.f18506 = c0970;
        this.f18504 = i;
        this.f18505 = ((AbstractList) c0970).modCount;
    }

    public C4848(C4270 c4270, int i) {
        this.f18506 = c4270;
        this.f18504 = i;
        this.f18505 = ((AbstractList) c4270).modCount;
    }

    @Override // java.util.ListIterator
    public final void add(Object obj) {
        int i = this.f18502;
        AbstractC5474 abstractC5474 = this.f18506;
        switch (i) {
            case 0:
                m10088();
                C4270 c4270 = (C4270) abstractC5474;
                int i2 = this.f18504;
                this.f18504 = i2 + 1;
                c4270.add(i2, obj);
                this.f18503 = -1;
                this.f18505 = ((AbstractList) c4270).modCount;
                break;
            default:
                m10087();
                C0970 c0970 = (C0970) abstractC5474;
                int i3 = this.f18504;
                this.f18504 = i3 + 1;
                c0970.add(i3, obj);
                this.f18503 = -1;
                this.f18505 = ((AbstractList) c0970).modCount;
                break;
        }
    }

    @Override // java.util.ListIterator, java.util.Iterator
    public final boolean hasNext() {
        int i = this.f18502;
        AbstractC5474 abstractC5474 = this.f18506;
        switch (i) {
            case 0:
                if (this.f18504 < ((C4270) abstractC5474).f16318) {
                }
                break;
            default:
                if (this.f18504 < ((C0970) abstractC5474).f4256) {
                }
                break;
        }
        return true;
    }

    @Override // java.util.ListIterator
    public final boolean hasPrevious() {
        switch (this.f18502) {
            case 0:
                if (this.f18504 > 0) {
                }
                break;
            default:
                if (this.f18504 > 0) {
                }
                break;
        }
        return false;
    }

    @Override // java.util.ListIterator, java.util.Iterator
    public final Object next() {
        int i = this.f18502;
        AbstractC5474 abstractC5474 = this.f18506;
        switch (i) {
            case 0:
                m10088();
                int i2 = this.f18504;
                C4270 c4270 = (C4270) abstractC5474;
                if (i2 >= c4270.f16318) {
                    C4468.m9518();
                } else {
                    this.f18504 = i2 + 1;
                    this.f18503 = i2;
                }
                break;
            default:
                m10087();
                int i3 = this.f18504;
                C0970 c0970 = (C0970) abstractC5474;
                if (i3 >= c0970.f4256) {
                    C4468.m9518();
                } else {
                    this.f18504 = i3 + 1;
                    this.f18503 = i3;
                }
                break;
        }
        return null;
    }

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

    @Override // java.util.ListIterator
    public final Object previous() {
        int i = this.f18502;
        AbstractC5474 abstractC5474 = this.f18506;
        switch (i) {
            case 0:
                m10088();
                int i2 = this.f18504;
                if (i2 <= 0) {
                    C4468.m9518();
                } else {
                    int i3 = i2 - 1;
                    this.f18504 = i3;
                    this.f18503 = i3;
                    C4270 c4270 = (C4270) abstractC5474;
                }
                break;
            default:
                m10087();
                int i4 = this.f18504;
                if (i4 <= 0) {
                    C4468.m9518();
                } else {
                    int i5 = i4 - 1;
                    this.f18504 = i5;
                    this.f18503 = i5;
                }
                break;
        }
        return null;
    }

    @Override // java.util.ListIterator
    public final int previousIndex() {
        int i;
        switch (this.f18502) {
            case 0:
                i = this.f18504;
                break;
            default:
                i = this.f18504;
                break;
        }
        return i - 1;
    }

    @Override // java.util.ListIterator, java.util.Iterator
    public final void remove() {
        int i = this.f18502;
        AbstractC5474 abstractC5474 = this.f18506;
        switch (i) {
            case 0:
                C4270 c4270 = (C4270) abstractC5474;
                m10088();
                int i2 = this.f18503;
                if (i2 == -1) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Call next() or previous() before removing element from the iterator.");
                } else {
                    c4270.mo3168(i2);
                    this.f18504 = this.f18503;
                    this.f18503 = -1;
                    this.f18505 = ((AbstractList) c4270).modCount;
                }
                break;
            default:
                C0970 c0970 = (C0970) abstractC5474;
                m10087();
                int i3 = this.f18503;
                if (i3 == -1) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Call next() or previous() before removing element from the iterator.");
                } else {
                    c0970.mo3168(i3);
                    this.f18504 = this.f18503;
                    this.f18503 = -1;
                    this.f18505 = ((AbstractList) c0970).modCount;
                }
                break;
        }
    }

    @Override // java.util.ListIterator
    public final void set(Object obj) {
        int i = this.f18502;
        AbstractC5474 abstractC5474 = this.f18506;
        switch (i) {
            case 0:
                m10088();
                int i2 = this.f18503;
                if (i2 == -1) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Call next() or previous() before replacing element from the iterator.");
                } else {
                    ((C4270) abstractC5474).set(i2, obj);
                }
                break;
            default:
                m10087();
                int i3 = this.f18503;
                if (i3 == -1) {
                    ᵕᵩʽᵲ.ᵪᵹᵥᵻ("Call next() or previous() before replacing element from the iterator.");
                } else {
                    ((C0970) abstractC5474).set(i3, obj);
                }
                break;
        }
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public void m10087() {
        if (((AbstractList) ((C0970) this.f18506)).modCount != this.f18505) {
            throw new ConcurrentModificationException();
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public void m10088() {
        if (((AbstractList) ((C4270) this.f18506).f16321).modCount != this.f18505) {
            throw new ConcurrentModificationException();
        }
    }
}
