package o;

import java.util.ListIterator;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public abstract class S implements ListIterator, InterfaceC2989yJ {
    public int l;
    public int m;

    public S(int i, int i2) {
        this.l = i;
        this.m = i2;
    }

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

    @Override // java.util.ListIterator, java.util.Iterator
    public final boolean hasNext() {
        return this.l < this.m;
    }

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

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

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

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

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