package e.t;

import java.util.Iterator;

/* JADX INFO: loaded from: classes.dex */
public class a implements Iterable<Integer>, e.s.c.t.a {

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

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

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

    public a(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.f6018b = i2;
        if (i4 > 0) {
            if (i2 < i3) {
                i3 -= d.a.u.a.u(d.a.u.a.u(i3, i4) - d.a.u.a.u(i2, i4), i4);
            }
        } else {
            if (i4 >= 0) {
                throw new IllegalArgumentException("Step is zero.");
            }
            if (i2 > i3) {
                int i5 = -i4;
                i3 += d.a.u.a.u(d.a.u.a.u(i2, i5) - d.a.u.a.u(i3, i5), i5);
            }
        }
        this.f6019c = i3;
        this.f6020d = i4;
    }

    public boolean equals(Object obj) {
        if (obj instanceof a) {
            if (!isEmpty() || !((a) obj).isEmpty()) {
                a aVar = (a) obj;
                if (this.f6018b != aVar.f6018b || this.f6019c != aVar.f6019c || this.f6020d != aVar.f6020d) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f6018b * 31) + this.f6019c) * 31) + this.f6020d;
    }

    public boolean isEmpty() {
        if (this.f6020d > 0) {
            if (this.f6018b > this.f6019c) {
                return true;
            }
        } else if (this.f6018b < this.f6019c) {
            return true;
        }
        return false;
    }

    @Override // java.lang.Iterable
    public Iterator<Integer> iterator() {
        return new b(this.f6018b, this.f6019c, this.f6020d);
    }

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