package androidx.core.graphics;

import android.graphics.Insets;
import android.graphics.Rect;

/* JADX INFO: compiled from: Insets.java */
/* JADX INFO: loaded from: classes.dex */
public final class b {

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public static final b f1684e = new b(0, 0, 0, 0);

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

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

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

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

    /* JADX INFO: compiled from: Insets.java */
    static class a {
        static Insets a(int i3, int i4, int i5, int i6) {
            return Insets.of(i3, i4, i5, i6);
        }
    }

    private b(int i3, int i4, int i5, int i6) {
        this.f1685a = i3;
        this.f1686b = i4;
        this.f1687c = i5;
        this.f1688d = i6;
    }

    public static b a(b bVar, b bVar2) {
        return b(Math.max(bVar.f1685a, bVar2.f1685a), Math.max(bVar.f1686b, bVar2.f1686b), Math.max(bVar.f1687c, bVar2.f1687c), Math.max(bVar.f1688d, bVar2.f1688d));
    }

    public static b b(int i3, int i4, int i5, int i6) {
        return (i3 == 0 && i4 == 0 && i5 == 0 && i6 == 0) ? f1684e : new b(i3, i4, i5, i6);
    }

    public static b c(Rect rect) {
        return b(rect.left, rect.top, rect.right, rect.bottom);
    }

    public static b d(Insets insets) {
        return b(insets.left, insets.top, insets.right, insets.bottom);
    }

    public Insets e() {
        return a.a(this.f1685a, this.f1686b, this.f1687c, this.f1688d);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || b.class != obj.getClass()) {
            return false;
        }
        b bVar = (b) obj;
        return this.f1688d == bVar.f1688d && this.f1685a == bVar.f1685a && this.f1687c == bVar.f1687c && this.f1686b == bVar.f1686b;
    }

    public int hashCode() {
        return (((((this.f1685a * 31) + this.f1686b) * 31) + this.f1687c) * 31) + this.f1688d;
    }

    public String toString() {
        return "Insets{left=" + this.f1685a + ", top=" + this.f1686b + ", right=" + this.f1687c + ", bottom=" + this.f1688d + '}';
    }
}
