public class Localpart extends Part
 You can create instances of this class from Strings using from(String).
 
| Modifier and Type | Method and Description | 
|---|---|
String | 
asUnescapedString()
Return the unescaped String representation of this Localpart. 
 | 
static Localpart | 
formUnescapedOrNull(CharSequence cs)
 | 
static Localpart | 
from(String localpart)
Get the  
Localpart representing the input String. | 
static Localpart | 
fromOrNull(CharSequence cs)
 | 
static Localpart | 
fromOrThrowUnchecked(CharSequence cs)
Like  
from(String) but does throw an unchecked IllegalArgumentException instead of a
 XmppStringprepException. | 
static Localpart | 
fromUnescaped(CharSequence unescapedLocalpart)
Get a  
Localpart from an unescaped CharSequence. | 
static Localpart | 
fromUnescaped(String unescapedLocalpart)
Get a  
Localpart from an unescaped String. | 
static Localpart | 
fromUnescapedOrThrowUnchecked(CharSequence cs)
Like  
fromUnescaped(String) but does throw an unchecked IllegalArgumentException instead of a
 XmppStringprepException. | 
assertNotLongerThan1023BytesOrEmpty, charAt, equals, hashCode, intern, length, subSequence, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitchars, codePointspublic String asUnescapedString()
Since certain Unicode code points are disallowed in the localpart of a JID by the required stringprep profile, those need to get escaped when used in a real JID. The unescaped representation of the JID is only for presentation to a human user or for gatewaying to a non-XMPP system.
Jid.asUnescapedString()public static Localpart fromOrThrowUnchecked(CharSequence cs)
from(String) but does throw an unchecked IllegalArgumentException instead of a
 XmppStringprepException.cs - the character sequence which should be transformed to a LocalpartLocalpart if no exception occursIllegalArgumentException - if the given input is not a valid Localpartfrom(String)public static Localpart fromUnescapedOrThrowUnchecked(CharSequence cs)
fromUnescaped(String) but does throw an unchecked IllegalArgumentException instead of a
 XmppStringprepException.cs - the character sequence which should be transformed to a LocalpartLocalpart if no exception occursfrom(String)public static Localpart formUnescapedOrNull(CharSequence cs)
cs - the input CharSequencenullpublic static Localpart fromUnescaped(String unescapedLocalpart) throws XmppStringprepException
Localpart from an unescaped String.unescapedLocalpart - an unescaped String representing a Localpart.XmppStringprepException - if an error occurs.public static Localpart fromUnescaped(CharSequence unescapedLocalpart) throws XmppStringprepException
Localpart from an unescaped CharSequence.unescapedLocalpart - an unescaped CharSequence representing a Localpart.XmppStringprepException - if an error occurs.public static Localpart fromOrNull(CharSequence cs)
cs - the input CharSequencenullpublic static Localpart from(String localpart) throws XmppStringprepException
Localpart representing the input String.localpart - the input String.XmppStringprepException - if an error occurs.