package defpackage;

import java.lang.annotation.Annotation;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public final class kw2 {
    public final String a;
    public final Map b;

    public static final class b {
        public final String a;
        public HashMap b = null;

        public b(String str) {
            this.a = str;
        }

        public final kw2 a() {
            return new kw2(this.a, this.b == null ? Collections.EMPTY_MAP : Collections.unmodifiableMap(new HashMap(this.b)));
        }

        public final void b(Annotation annotation) {
            if (this.b == null) {
                this.b = new HashMap();
            }
            this.b.put(annotation.annotationType(), annotation);
        }
    }

    public kw2(String str, Map map) {
        this.a = str;
        this.b = map;
    }

    public static kw2 a(String str) {
        return new kw2(str, Collections.EMPTY_MAP);
    }

    public final boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof kw2)) {
            return false;
        }
        kw2 kw2Var = (kw2) obj;
        return this.a.equals(kw2Var.a) && this.b.equals(kw2Var.b);
    }

    public final int hashCode() {
        return this.b.hashCode() + (this.a.hashCode() * 31);
    }

    public final String toString() {
        return "FieldDescriptor{name=" + this.a + ", properties=" + this.b.values() + "}";
    }
}
