package com.google.common.collect;

import java.util.Map;

/* loaded from: classes3.dex */
public abstract class z {

    /* JADX WARN: Failed to restore enum class, 'enum' modifier and super class removed */
    /* JADX WARN: Unknown enum class pattern. Please report as an issue! */
    /* loaded from: classes3.dex */
    private static abstract class a implements ck.c {
        public static final a KEY = new C0323a("KEY", 0);
        public static final a VALUE = new b("VALUE", 1);
        private static final /* synthetic */ a[] $VALUES = $values();

        /* renamed from: com.google.common.collect.z$a$a, reason: collision with other inner class name */
        /* loaded from: classes3.dex */
        enum C0323a extends a {
            C0323a(String str, int i10) {
                super(str, i10, null);
            }

            @Override // com.google.common.collect.z.a, ck.c
            public Object apply(Map.Entry<?, ?> entry) {
                return entry.getKey();
            }
        }

        /* loaded from: classes3.dex */
        enum b extends a {
            b(String str, int i10) {
                super(str, i10, null);
            }

            @Override // com.google.common.collect.z.a, ck.c
            public Object apply(Map.Entry<?, ?> entry) {
                return entry.getValue();
            }
        }

        private static /* synthetic */ a[] $values() {
            return new a[]{KEY, VALUE};
        }

        private a(String str, int i10) {
        }

        public static a valueOf(String str) {
            return (a) Enum.valueOf(a.class, str);
        }

        public static a[] values() {
            return (a[]) $VALUES.clone();
        }

        @Override // ck.c
        public abstract /* synthetic */ Object apply(Object obj);

        /* synthetic */ a(String str, int i10, y yVar) {
            this(str, i10);
        }
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static boolean a(Map map, Object obj) {
        if (map == obj) {
            return true;
        }
        if (obj instanceof Map) {
            return map.entrySet().equals(((Map) obj).entrySet());
        }
        return false;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static ck.c b() {
        return a.KEY;
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static String c(Map map) {
        StringBuilder a10 = h.a(map.size());
        a10.append('{');
        boolean z10 = true;
        for (Map.Entry entry : map.entrySet()) {
            if (!z10) {
                a10.append(", ");
            }
            a10.append(entry.getKey());
            a10.append('=');
            a10.append(entry.getValue());
            z10 = false;
        }
        a10.append('}');
        return a10.toString();
    }

    /* JADX INFO: Access modifiers changed from: package-private */
    public static ck.c d() {
        return a.VALUE;
    }
}
