package U6;

import java.util.Iterator;
import java.util.NoSuchElementException;

/* JADX INFO: loaded from: classes.dex */
public final class b implements Iterator, Q6.a {

    /* JADX INFO: renamed from: q, reason: collision with root package name */
    public final int f6800q;

    /* JADX INFO: renamed from: r, reason: collision with root package name */
    public final int f6801r;

    /* JADX INFO: renamed from: s, reason: collision with root package name */
    public boolean f6802s;

    /* JADX INFO: renamed from: t, reason: collision with root package name */
    public int f6803t;

    public b(int i, int i5, int i8) {
        this.f6800q = i8;
        this.f6801r = i5;
        boolean z8 = false;
        if (i8 <= 0 ? i >= i5 : i <= i5) {
            z8 = true;
        }
        this.f6802s = z8;
        this.f6803t = z8 ? i : i5;
    }

    @Override // java.util.Iterator
    public final boolean hasNext() {
        return this.f6802s;
    }

    @Override // java.util.Iterator
    public final Object next() {
        int i = this.f6803t;
        if (i != this.f6801r) {
            this.f6803t = this.f6800q + i;
        } else {
            if (!this.f6802s) {
                throw new NoSuchElementException();
            }
            this.f6802s = false;
        }
        return Integer.valueOf(i);
    }

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