/*
 * Decompiled with CFR 0.152.
 */
package org.jxmpp.jid.impl;

import org.jxmpp.jid.BareJid;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.DomainFullJid;
import org.jxmpp.jid.FullJid;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.JidWithLocalpart;
import org.jxmpp.jid.JidWithResource;
import org.jxmpp.jid.impl.AbstractJid;
import org.jxmpp.jid.parts.Domainpart;
import org.jxmpp.jid.parts.Localpart;
import org.jxmpp.jid.parts.Resourcepart;
import org.jxmpp.stringprep.XmppStringprepException;

public class DomainpartJid
extends AbstractJid
implements DomainBareJid {
    protected final Domainpart domain;

    DomainpartJid(String domain) throws XmppStringprepException {
        this(Domainpart.from(domain));
    }

    DomainpartJid(Domainpart domain) {
        this.domain = domain;
    }

    @Override
    public Domainpart getDomain() {
        return this.domain;
    }

    @Override
    public String toString() {
        return this.domain.toString();
    }

    @Override
    public String asUnescapedString() {
        return this.toString();
    }

    @Override
    public DomainBareJid asDomainBareJid() {
        return this;
    }

    @Override
    public boolean hasNoResource() {
        return true;
    }

    @Override
    public BareJid asBareJidIfPossible() {
        return null;
    }

    @Override
    public FullJid asFullJidIfPossible() {
        return null;
    }

    @Override
    public DomainBareJid asDomainBareJidIfPossible() {
        return this.asDomainBareJid();
    }

    @Override
    public DomainFullJid asDomainFullJidIfPossible() {
        return null;
    }

    @Override
    public boolean isParentOf(BareJid bareJid) {
        return this.domain.equals(bareJid.getDomain());
    }

    @Override
    public boolean isParentOf(FullJid fullJid) {
        return this.domain.equals(fullJid.getDomain());
    }

    @Override
    public boolean isParentOf(DomainBareJid domainBareJid) {
        return this.domain.equals(domainBareJid.getDomain());
    }

    @Override
    public boolean isParentOf(DomainFullJid domainFullJid) {
        return this.domain.equals(domainFullJid.getDomain());
    }

    @Override
    public Jid withoutResource() {
        return this;
    }

    @Override
    public Localpart maybeGetLocalpart() {
        return null;
    }

    @Override
    public Resourcepart maybeGetResourcepart() {
        return null;
    }

    @Override
    public JidWithLocalpart asJidWithLocalpartIfPossible() {
        return null;
    }

    @Override
    public JidWithResource asJidWithResourcepartIfPossible() {
        return null;
    }
}
