package o;

import java.util.RandomAccess;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class P extends Q implements RandomAccess {
    public final Q l;
    public final int m;
    public final int n;

    public P(Q q, int i, int i2) {
        this.l = q;
        this.m = i;
        AbstractC0752ap.x(i, i2, q.a());
        this.n = i2 - i;
    }

    @Override // o.AbstractC2864x
    public final int a() {
        return this.n;
    }

    @Override // java.util.List
    public final Object get(int i) {
        int i2 = this.n;
        if (i < 0 || i >= i2) {
            throw new IndexOutOfBoundsException(AbstractC0126Ew.i(i, i2, "index: ", ", size: "));
        }
        return this.l.get(this.m + i);
    }
}
