package z1;

import l1.v;

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

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

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

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

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

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

        public /* synthetic */ C0090a(w1.e eVar) {
            this();
        }

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

    public a(int i3, int i4, int i5) {
        if (i5 == 0) {
            throw new IllegalArgumentException("Step must be non-zero.");
        }
        if (i5 == Integer.MIN_VALUE) {
            throw new IllegalArgumentException("Step must be greater than Int.MIN_VALUE to avoid overflow on negation.");
        }
        this.f6001e = i3;
        this.f6002f = q1.c.b(i3, i4, i5);
        this.f6003g = i5;
    }

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

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

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

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

    public boolean equals(Object obj) {
        if (obj instanceof a) {
            if (!isEmpty() || !((a) obj).isEmpty()) {
                a aVar = (a) obj;
                if (this.f6001e != aVar.f6001e || this.f6002f != aVar.f6002f || this.f6003g != aVar.f6003g) {
                }
            }
            return true;
        }
        return false;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return this.f6003g + (((this.f6001e * 31) + this.f6002f) * 31);
    }

    public boolean isEmpty() {
        if (this.f6003g > 0) {
            if (this.f6001e > this.f6002f) {
                return true;
            }
        } else if (this.f6001e < this.f6002f) {
            return true;
        }
        return false;
    }

    public String toString() {
        StringBuilder sb;
        int i3;
        if (this.f6003g > 0) {
            sb = new StringBuilder();
            sb.append(this.f6001e);
            sb.append("..");
            sb.append(this.f6002f);
            sb.append(" step ");
            i3 = this.f6003g;
        } else {
            sb = new StringBuilder();
            sb.append(this.f6001e);
            sb.append(" downTo ");
            sb.append(this.f6002f);
            sb.append(" step ");
            i3 = -this.f6003g;
        }
        sb.append(i3);
        return sb.toString();
    }
}
