package f.b0;

import f.u.x;

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

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

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

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

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

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

        public /* synthetic */ a(f.z.d.g gVar) {
            this();
        }

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

    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.f3907b = i2;
        this.f3908f = f.x.c.c(i2, i3, i4);
        this.f3909g = i4;
    }

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

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

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

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

    public boolean equals(Object obj) {
        if (obj instanceof f) {
            if (!isEmpty() || !((f) obj).isEmpty()) {
                f fVar = (f) obj;
                if (this.f3907b != fVar.f3907b || this.f3908f != fVar.f3908f || this.f3909g != fVar.f3909g) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f3907b * 31) + this.f3908f) * 31) + this.f3909g;
    }

    public boolean isEmpty() {
        if (this.f3909g > 0) {
            if (this.f3907b > this.f3908f) {
                return true;
            }
        } else if (this.f3907b < this.f3908f) {
            return true;
        }
        return false;
    }

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