package o;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class Y extends Q implements List, Collection, InterfaceC2989yJ {
    public abstract Y b(int i, Object obj);

    public abstract Y c(Object obj);

    @Override // o.AbstractC2864x, java.util.Collection, java.util.List
    public final boolean contains(Object obj) {
        return indexOf(obj) != -1;
    }

    @Override // o.AbstractC2864x, java.util.Collection, java.util.List
    public final boolean containsAll(Collection collection) {
        Collection collection2 = collection;
        if ((collection2 instanceof Collection) && collection2.isEmpty()) {
            return true;
        }
        Iterator it = collection2.iterator();
        while (it.hasNext()) {
            if (!contains(it.next())) {
                return false;
            }
        }
        return true;
    }

    public Y d(Collection collection) {
        NW nwE = e();
        nwE.addAll(collection);
        return nwE.c();
    }

    public abstract NW e();

    public abstract Y f(X x);

    public abstract Y h(int i);

    public abstract Y i(int i, Object obj);

    @Override // o.Q, java.util.Collection, java.lang.Iterable, java.util.List
    public final Iterator iterator() {
        return listIterator(0);
    }

    @Override // o.Q, java.util.List
    public final ListIterator listIterator() {
        return listIterator(0);
    }

    @Override // o.Q, java.util.List
    public final List subList(int i, int i2) {
        return new OG(this, i, i2);
    }
}
