package androidx.datastore.preferences.protobuf;

import java.util.Map;

/* JADX INFO: loaded from: classes.dex */
public final class c1 implements Map.Entry, Comparable {

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

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public Object f2051b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public final /* synthetic */ f1 f2052c;

    public c1(f1 f1Var, Comparable comparable, Object obj) {
        this.f2052c = f1Var;
        this.f2050a = comparable;
        this.f2051b = obj;
    }

    @Override // java.lang.Comparable
    public final int compareTo(Object obj) {
        return this.f2050a.compareTo(((c1) obj).f2050a);
    }

    @Override // java.util.Map.Entry
    public final boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Map.Entry)) {
            return false;
        }
        Map.Entry entry = (Map.Entry) obj;
        Object key = entry.getKey();
        Comparable comparable = this.f2050a;
        if (comparable != null ? comparable.equals(key) : key == null) {
            Object obj2 = this.f2051b;
            Object value = entry.getValue();
            if (obj2 == null) {
                if (value == null) {
                    return true;
                }
            } else if (obj2.equals(value)) {
                return true;
            }
        }
        return false;
    }

    @Override // java.util.Map.Entry
    public final Object getKey() {
        return this.f2050a;
    }

    @Override // java.util.Map.Entry
    public final Object getValue() {
        return this.f2051b;
    }

    @Override // java.util.Map.Entry
    public final int hashCode() {
        Comparable comparable = this.f2050a;
        int iHashCode = comparable == null ? 0 : comparable.hashCode();
        Object obj = this.f2051b;
        return (obj != null ? obj.hashCode() : 0) ^ iHashCode;
    }

    @Override // java.util.Map.Entry
    public final Object setValue(Object obj) {
        this.f2052c.b();
        Object obj2 = this.f2051b;
        this.f2051b = obj;
        return obj2;
    }

    public final String toString() {
        return this.f2050a + "=" + this.f2051b;
    }
}
