package o;

import java.util.Iterator;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.bI, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public class C0800bI implements Iterable, InterfaceC2989yJ {
    public final int l;
    public final int m;
    public final int n;

    public C0800bI(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.l = i;
        this.m = AbstractC1155f00.r(i, i2, i3);
        this.n = i3;
    }

    public boolean equals(Object obj) {
        if (!(obj instanceof C0800bI)) {
            return false;
        }
        if (isEmpty() && ((C0800bI) obj).isEmpty()) {
            return true;
        }
        C0800bI c0800bI = (C0800bI) obj;
        return this.l == c0800bI.l && this.m == c0800bI.m && this.n == c0800bI.n;
    }

    public int hashCode() {
        if (isEmpty()) {
            return -1;
        }
        return (((this.l * 31) + this.m) * 31) + this.n;
    }

    public boolean isEmpty() {
        int i = this.n;
        int i2 = this.m;
        int i3 = this.l;
        return i > 0 ? i3 > i2 : i3 < i2;
    }

    @Override // java.lang.Iterable
    public final Iterator iterator() {
        return new C0895cI(this.l, this.m, this.n);
    }

    public String toString() {
        StringBuilder sb;
        int i = this.m;
        int i2 = this.l;
        int i3 = this.n;
        if (i3 > 0) {
            sb = new StringBuilder();
            sb.append(i2);
            sb.append("..");
            sb.append(i);
            sb.append(" step ");
            sb.append(i3);
        } else {
            sb = new StringBuilder();
            sb.append(i2);
            sb.append(" downTo ");
            sb.append(i);
            sb.append(" step ");
            sb.append(-i3);
        }
        return sb.toString();
    }
}
