package h.z;

import h.s.a0;
import java.util.NoSuchElementException;

/* JADX INFO: compiled from: ProgressionIterators.kt */
/* JADX INFO: loaded from: classes.dex */
public final class j extends a0 {
    private final long b;

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

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

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

    public j(long j2, long j3, long j4) {
        this.b = j4;
        this.f1012e = j3;
        boolean z = true;
        if (j4 <= 0 ? j2 < j3 : j2 > j3) {
            z = false;
        }
        this.f1013f = z;
        this.f1014g = z ? j2 : this.f1012e;
    }

    @Override // h.s.a0
    public long a() {
        long j2 = this.f1014g;
        if (j2 != this.f1012e) {
            this.f1014g = this.b + j2;
        } else {
            if (!this.f1013f) {
                throw new NoSuchElementException();
            }
            this.f1013f = false;
        }
        return j2;
    }

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