package j.r0;

import j.p0.d.r;
import java.util.NoSuchElementException;

/* JADX INFO: compiled from: ProgressionIterators.kt */
/* JADX INFO: loaded from: classes.dex */
public final class b extends j.k0.l {
    private final int b;
    private final int d;
    private boolean e;
    private int f;

    public b(char c, char c2, int i2) {
        this.b = i2;
        this.d = c2;
        boolean z = true;
        int iH = r.h(c, c2);
        if (i2 <= 0 ? iH < 0 : iH > 0) {
            z = false;
        }
        this.e = z;
        this.f = z ? c : this.d;
    }

    @Override // j.k0.l
    public char b() {
        int i2 = this.f;
        if (i2 != this.d) {
            this.f = this.b + i2;
        } else {
            if (!this.e) {
                throw new NoSuchElementException();
            }
            this.e = false;
        }
        return (char) i2;
    }

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