package c.r;

import c.l.w;

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

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final C0034a f1452e = new C0034a(null);

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

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

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

    /* JADX INFO: renamed from: c.r.a$a, reason: collision with other inner class name */
    /* JADX INFO: compiled from: Progressions.kt */
    public static final class C0034a {
        private C0034a() {
        }

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

        public /* synthetic */ C0034a(c.q.d.g gVar) {
            this();
        }
    }

    public a(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.f1453b = i;
        this.f1454c = c.o.c.b(i, i2, i3);
        this.f1455d = i3;
    }

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

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

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

    @Override // java.lang.Iterable
    /* JADX INFO: renamed from: d, reason: merged with bridge method [inline-methods] */
    public w iterator() {
        return new b(this.f1453b, this.f1454c, this.f1455d);
    }

    public boolean equals(Object obj) {
        if (obj instanceof a) {
            if (!isEmpty() || !((a) obj).isEmpty()) {
                a aVar = (a) obj;
                if (this.f1453b != aVar.f1453b || this.f1454c != aVar.f1454c || this.f1455d != aVar.f1455d) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.f1453b * 31) + this.f1454c) * 31) + this.f1455d;
    }

    public boolean isEmpty() {
        if (this.f1455d > 0) {
            if (this.f1453b > this.f1454c) {
                return true;
            }
        } else if (this.f1453b < this.f1454c) {
            return true;
        }
        return false;
    }

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