package p402.p403;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.NoSuchElementException;
import java.util.RandomAccess;
import kotlin.jvm.internal.DefaultConstructorMarker;
import p138.p139.p143.p144.C2803;
import p402.InterfaceC6540;
import p402.p411.p413.C6635;
import p402.p411.p413.p414.InterfaceC6650;

/* JADX INFO: renamed from: ގ.ފ.ؠ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes.dex */
@InterfaceC6540
public abstract class AbstractC6553<E> extends AbstractC6551<E> implements List<E>, InterfaceC6650 {

    /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
    public static final C6554 f19332 = new C6554(null);

    /* JADX INFO: renamed from: ގ.ފ.ؠ$֏, reason: contains not printable characters */
    public static final class C6554 {
        public C6554() {
        }

        public /* synthetic */ C6554(DefaultConstructorMarker defaultConstructorMarker) {
        }
    }

    /* JADX INFO: renamed from: ގ.ފ.ؠ$ؠ, reason: contains not printable characters */
    public class C6555 implements Iterator<E>, InterfaceC6650 {

        /* JADX INFO: renamed from: ރ, reason: contains not printable characters */
        public int f19333;

        public C6555() {
        }

        @Override // java.util.Iterator
        public boolean hasNext() {
            return this.f19333 < AbstractC6553.this.mo9770();
        }

        @Override // java.util.Iterator
        public E next() {
            if (!hasNext()) {
                throw new NoSuchElementException();
            }
            AbstractC6553 abstractC6553 = AbstractC6553.this;
            int i = this.f19333;
            this.f19333 = i + 1;
            return (E) abstractC6553.get(i);
        }

        @Override // java.util.Iterator
        public void remove() {
            throw new UnsupportedOperationException("Operation is not supported for read-only collection");
        }
    }

    /* JADX INFO: renamed from: ގ.ފ.ؠ$ހ, reason: contains not printable characters */
    public class C6556 extends AbstractC6553<E>.C6555 implements ListIterator<E>, InterfaceC6650 {
        public C6556(int i) {
            super();
            C6554 c6554 = AbstractC6553.f19332;
            int iMo9770 = AbstractC6553.this.mo9770();
            if (c6554 == null) {
                throw null;
            }
            if (i < 0 || i > iMo9770) {
                throw new IndexOutOfBoundsException(C2803.m4873("index: ", i, ", size: ", iMo9770));
            }
            this.f19333 = i;
        }

        @Override // java.util.ListIterator
        public void add(E e) {
            throw new UnsupportedOperationException("Operation is not supported for read-only collection");
        }

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

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

        @Override // java.util.ListIterator
        public E previous() {
            if (!hasPrevious()) {
                throw new NoSuchElementException();
            }
            AbstractC6553 abstractC6553 = AbstractC6553.this;
            int i = this.f19333 - 1;
            this.f19333 = i;
            return (E) abstractC6553.get(i);
        }

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

        @Override // java.util.ListIterator
        public void set(E e) {
            throw new UnsupportedOperationException("Operation is not supported for read-only collection");
        }
    }

    /* JADX INFO: renamed from: ގ.ފ.ؠ$ށ, reason: contains not printable characters */
    public static final class C6557<E> extends AbstractC6553<E> implements RandomAccess {

        /* JADX INFO: renamed from: ބ, reason: contains not printable characters */
        public int f19336;

        /* JADX INFO: renamed from: ޅ, reason: contains not printable characters */
        public final AbstractC6553<E> f19337;

        /* JADX INFO: renamed from: ކ, reason: contains not printable characters */
        public final int f19338;

        /* JADX WARN: Multi-variable type inference failed */
        public C6557(AbstractC6553<? extends E> abstractC6553, int i, int i2) {
            if (abstractC6553 == 0) {
                C6635.m9824("list");
                throw null;
            }
            this.f19337 = abstractC6553;
            this.f19338 = i;
            C6554 c6554 = AbstractC6553.f19332;
            int iMo9770 = abstractC6553.mo9770();
            if (c6554 == null) {
                throw null;
            }
            if (i < 0 || i2 > iMo9770) {
                StringBuilder sbM4890 = C2803.m4890("fromIndex: ", i, ", toIndex: ", i2, ", size: ");
                sbM4890.append(iMo9770);
                throw new IndexOutOfBoundsException(sbM4890.toString());
            }
            if (i > i2) {
                throw new IllegalArgumentException(C2803.m4873("fromIndex: ", i, " > toIndex: ", i2));
            }
            this.f19336 = i2 - this.f19338;
        }

        @Override // p402.p403.AbstractC6553, java.util.List
        public E get(int i) {
            C6554 c6554 = AbstractC6553.f19332;
            int i2 = this.f19336;
            if (c6554 == null) {
                throw null;
            }
            if (i < 0 || i >= i2) {
                throw new IndexOutOfBoundsException(C2803.m4873("index: ", i, ", size: ", i2));
            }
            return this.f19337.get(this.f19338 + i);
        }

        @Override // p402.p403.AbstractC6551
        /* JADX INFO: renamed from: ހ */
        public int mo9770() {
            return this.f19336;
        }
    }

    @Override // java.util.List
    public void add(int i, E e) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public boolean addAll(int i, Collection<? extends E> collection) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.Collection, java.util.List
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof List)) {
            return false;
        }
        Collection collection = (Collection) obj;
        if (f19332 == null) {
            throw null;
        }
        if (collection == null) {
            C6635.m9824("other");
            throw null;
        }
        if (size() == collection.size()) {
            Iterator<E> it = collection.iterator();
            Iterator<E> it2 = iterator();
            while (it2.hasNext()) {
                if (!C6635.m9825(it2.next(), it.next())) {
                }
            }
            return true;
        }
        return false;
    }

    @Override // java.util.List
    public abstract E get(int i);

    @Override // java.util.Collection, java.util.List
    public int hashCode() {
        if (f19332 == null) {
            throw null;
        }
        int iHashCode = 1;
        Iterator<E> it = iterator();
        while (it.hasNext()) {
            E next = it.next();
            iHashCode = (iHashCode * 31) + (next != null ? next.hashCode() : 0);
        }
        return iHashCode;
    }

    @Override // java.util.List
    public int indexOf(Object obj) {
        Iterator<E> it = iterator();
        int i = 0;
        while (it.hasNext()) {
            if (C6635.m9825(it.next(), obj)) {
                return i;
            }
            i++;
        }
        return -1;
    }

    @Override // java.util.Collection, java.lang.Iterable, java.util.List
    public Iterator<E> iterator() {
        return new C6555();
    }

    @Override // java.util.List
    public int lastIndexOf(Object obj) {
        ListIterator<E> listIterator = listIterator(size());
        while (listIterator.hasPrevious()) {
            if (C6635.m9825(listIterator.previous(), obj)) {
                return listIterator.nextIndex();
            }
        }
        return -1;
    }

    @Override // java.util.List
    public ListIterator<E> listIterator() {
        return new C6556(0);
    }

    @Override // java.util.List
    public ListIterator<E> listIterator(int i) {
        return new C6556(i);
    }

    @Override // java.util.List
    public E remove(int i) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public E set(int i, E e) {
        throw new UnsupportedOperationException("Operation is not supported for read-only collection");
    }

    @Override // java.util.List
    public List<E> subList(int i, int i2) {
        return new C6557(this, i, i2);
    }
}
