package f.b0;

import f.u.y;
import java.util.NoSuchElementException;

/* JADX INFO: compiled from: ProgressionIterators.kt */
/* JADX INFO: loaded from: classes.dex */
public final class j extends y {

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final long f3919b;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    private final long f3920f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    private boolean f3921g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    private long f3922h;

    public j(long j2, long j3, long j4) {
        this.f3919b = j4;
        this.f3920f = j3;
        boolean z = true;
        if (j4 <= 0 ? j2 < j3 : j2 > j3) {
            z = false;
        }
        this.f3921g = z;
        this.f3922h = z ? j2 : this.f3920f;
    }

    @Override // f.u.y
    public long a() {
        long j2 = this.f3922h;
        if (j2 != this.f3920f) {
            this.f3922h = this.f3919b + j2;
        } else {
            if (!this.f3921g) {
                throw new NoSuchElementException();
            }
            this.f3921g = false;
        }
        return j2;
    }

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