package g.j0;

import g.c0.r;

/* JADX INFO: compiled from: Progressions.kt */
/* JADX INFO: loaded from: classes.dex */
@g.i
public class f implements Iterable<Integer>, g.h0.c.g0.a {

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

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

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

    public f(int i2, int i3, int i4) {
        if (i4 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        }
        if (i4 == Integer.MIN_VALUE) {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
        this.f4123b = i2;
        this.f4124e = f.a.y.a.h0(i2, i3, i4);
        this.f4125f = i4;
    }

    @Override // java.lang.Iterable
    /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
    public r iterator() {
        return new g(this.f4123b, this.f4124e, this.f4125f);
    }

    public boolean equals(Object obj) {
        if (obj instanceof f) {
            if (!isEmpty() || !((f) obj).isEmpty()) {
                f fVar = (f) obj;
                if (this.f4123b != fVar.f4123b || this.f4124e != fVar.f4124e || this.f4125f != fVar.f4125f) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f4123b * 31) + this.f4124e) * 31) + this.f4125f;
    }

    public boolean isEmpty() {
        if (this.f4125f > 0) {
            if (this.f4123b > this.f4124e) {
                return true;
            }
        } else if (this.f4123b < this.f4124e) {
            return true;
        }
        return false;
    }

    public String toString() {
        StringBuilder sb;
        int i2;
        if (this.f4125f > 0) {
            sb = new StringBuilder();
            sb.append(this.f4123b);
            sb.append("..");
            sb.append(this.f4124e);
            sb.append(" step ");
            i2 = this.f4125f;
        } else {
            sb = new StringBuilder();
            sb.append(this.f4123b);
            sb.append(" downTo ");
            sb.append(this.f4124e);
            sb.append(" step ");
            i2 = -this.f4125f;
        }
        sb.append(i2);
        return sb.toString();
    }
}
