package d.p0;

import d.j0.f0;

/* JADX INFO: compiled from: Progressions.kt */
/* JADX INFO: loaded from: classes.dex */
@d.n
public class f implements Iterable<Integer> {

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public static final a f2669c = new a(null);

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private final int f2670d;

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

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

    /* JADX INFO: compiled from: Progressions.kt */
    @d.n
    public static final class a {
        private a() {
        }

        public /* synthetic */ a(d.n0.c.l lVar) {
            this();
        }

        public final f a(int i, int i2, int i3) {
            return new f(i, i2, i3);
        }
    }

    public f(int i, int i2, int i3) {
        if (i3 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        }
        if (i3 == Integer.MIN_VALUE) {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
        this.f2670d = i;
        this.f2671e = d.l0.c.c(i, i2, i3);
        this.f2672f = i3;
    }

    public final int a() {
        return this.f2670d;
    }

    public final int b() {
        return this.f2671e;
    }

    public final int c() {
        return this.f2672f;
    }

    @Override // java.lang.Iterable
    /* JADX INFO: renamed from: d, reason: merged with bridge method [inline-methods] */
    public f0 iterator() {
        return new g(this.f2670d, this.f2671e, this.f2672f);
    }

    public boolean equals(Object obj) {
        if (obj instanceof f) {
            if (!isEmpty() || !((f) obj).isEmpty()) {
                f fVar = (f) obj;
                if (this.f2670d != fVar.f2670d || this.f2671e != fVar.f2671e || this.f2672f != fVar.f2672f) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f2670d * 31) + this.f2671e) * 31) + this.f2672f;
    }

    public boolean isEmpty() {
        if (this.f2672f > 0) {
            if (this.f2670d > this.f2671e) {
                return true;
            }
        } else if (this.f2670d < this.f2671e) {
            return true;
        }
        return false;
    }

    public String toString() {
        StringBuilder sb;
        int i;
        if (this.f2672f > 0) {
            sb = new StringBuilder();
            sb.append(this.f2670d);
            sb.append("..");
            sb.append(this.f2671e);
            sb.append(" step ");
            i = this.f2672f;
        } else {
            sb = new StringBuilder();
            sb.append(this.f2670d);
            sb.append(" downTo ");
            sb.append(this.f2671e);
            sb.append(" step ");
            i = -this.f2672f;
        }
        sb.append(i);
        return sb.toString();
    }
}
