package o;

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

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class HN extends Q {
    public final /* synthetic */ int l;
    public final Object m;

    public /* synthetic */ HN(int i, Object obj) {
        this.l = i;
        this.m = obj;
    }

    @Override // o.AbstractC2864x
    public final int a() {
        switch (this.l) {
            case 0:
                return ((IN) this.m).a.groupCount() + 1;
            default:
                return ((List) this.m).size();
        }
    }

    @Override // o.AbstractC2864x, java.util.Collection, java.util.List
    public /* bridge */ boolean contains(Object obj) {
        switch (this.l) {
            case 0:
                if (obj instanceof String) {
                    return super.contains((String) obj);
                }
                return false;
            default:
                return super.contains(obj);
        }
    }

    @Override // java.util.List
    public final Object get(int i) {
        switch (this.l) {
            case 0:
                String strGroup = ((IN) this.m).a.group(i);
                return strGroup == null ? "" : strGroup;
            default:
                List list = (List) this.m;
                if (i >= 0 && i <= AbstractC0008Ai.R(this)) {
                    return list.get(AbstractC0008Ai.R(this) - i);
                }
                StringBuilder sbO = AbstractC0126Ew.o(i, "Element index ", " must be in range [");
                sbO.append(new C0991dI(0, AbstractC0008Ai.R(this), 1));
                sbO.append("].");
                throw new IndexOutOfBoundsException(sbO.toString());
        }
    }

    @Override // o.Q, java.util.List
    public /* bridge */ int indexOf(Object obj) {
        switch (this.l) {
            case 0:
                if (obj instanceof String) {
                    return super.indexOf((String) obj);
                }
                return -1;
            default:
                return super.indexOf(obj);
        }
    }

    @Override // o.Q, java.util.Collection, java.lang.Iterable, java.util.List
    public Iterator iterator() {
        switch (this.l) {
            case 1:
                return new M20(this, 0);
            default:
                return super.iterator();
        }
    }

    @Override // o.Q, java.util.List
    public /* bridge */ int lastIndexOf(Object obj) {
        switch (this.l) {
            case 0:
                if (obj instanceof String) {
                    return super.lastIndexOf((String) obj);
                }
                return -1;
            default:
                return super.lastIndexOf(obj);
        }
    }

    @Override // o.Q, java.util.List
    public ListIterator listIterator() {
        switch (this.l) {
            case 1:
                return new M20(this, 0);
            default:
                return super.listIterator();
        }
    }

    @Override // o.Q, java.util.List
    public ListIterator listIterator(int i) {
        switch (this.l) {
            case 1:
                return new M20(this, i);
            default:
                return super.listIterator(i);
        }
    }
}
