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

import org.jxmpp.jid.parts.Part;
import org.jxmpp.stringprep.XmppStringPrepUtil;
import org.jxmpp.stringprep.XmppStringprepException;

public class Resourcepart
extends Part {
    public static final Resourcepart EMPTY = new Resourcepart("");

    private Resourcepart(String resource) {
        super(resource);
    }

    public static Resourcepart from(String resource) throws XmppStringprepException {
        resource = XmppStringPrepUtil.resourceprep(resource);
        Resourcepart.assertNotLongerThan1023BytesOrEmpty(resource);
        return new Resourcepart(resource);
    }
}
