package io.netty.handler.codec.xml;

import g.a.a.a.a;
import java.util.LinkedList;
import java.util.List;

/* JADX INFO: loaded from: classes.dex */
public abstract class XmlElement {
    private final String name;
    private final String namespace;
    private final List<XmlNamespace> namespaces = new LinkedList();
    private final String prefix;

    public XmlElement(String str, String str2, String str3) {
        this.name = str;
        this.namespace = str2;
        this.prefix = str3;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        XmlElement xmlElement = (XmlElement) obj;
        if (!this.name.equals(xmlElement.name)) {
            return false;
        }
        String str = this.namespace;
        if (str == null ? xmlElement.namespace != null : !str.equals(xmlElement.namespace)) {
            return false;
        }
        List<XmlNamespace> list = this.namespaces;
        if (list == null ? xmlElement.namespaces != null : !list.equals(xmlElement.namespaces)) {
            return false;
        }
        String str2 = this.prefix;
        String str3 = xmlElement.prefix;
        return str2 == null ? str3 == null : str2.equals(str3);
    }

    public int hashCode() {
        int iHashCode = this.name.hashCode() * 31;
        String str = this.namespace;
        int iHashCode2 = (iHashCode + (str != null ? str.hashCode() : 0)) * 31;
        String str2 = this.prefix;
        int iHashCode3 = (iHashCode2 + (str2 != null ? str2.hashCode() : 0)) * 31;
        List<XmlNamespace> list = this.namespaces;
        return iHashCode3 + (list != null ? list.hashCode() : 0);
    }

    public String name() {
        return this.name;
    }

    public String namespace() {
        return this.namespace;
    }

    public List<XmlNamespace> namespaces() {
        return this.namespaces;
    }

    public String prefix() {
        return this.prefix;
    }

    public String toString() {
        StringBuilder sbF = a.F(", name='");
        a.r0(sbF, this.name, '\'', ", namespace='");
        a.r0(sbF, this.namespace, '\'', ", prefix='");
        a.r0(sbF, this.prefix, '\'', ", namespaces=");
        sbF.append(this.namespaces);
        return sbF.toString();
    }
}
