Package org.jxmpp.jid.parts
Class Domainpart
java.lang.Object
org.jxmpp.jid.parts.Part
org.jxmpp.jid.parts.Domainpart
- All Implemented Interfaces:
Serializable
,CharSequence
A domainpart of an XMPP address (JID).
You can create instances of this class from Strings using from(String)
.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic Domainpart
Get theDomainpart
representing the input String.static Domainpart
from
(String domain, JxmppContext context) Get theDomainpart
representing the input String.static Domainpart
static Domainpart
Likefrom(String)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.Methods inherited from class org.jxmpp.jid.parts.Part
assertNotLongerThan1023BytesOrEmpty, charAt, equals, hashCode, intern, length, subSequence, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.CharSequence
chars, codePoints
-
Method Details
-
fromOrNull
- Parameters:
cs
- the input CharSequence- Returns:
- a Domainpart or
null
-
fromOrThrowUnchecked
Likefrom(String)
but does throw an uncheckedIllegalArgumentException
instead of aXmppStringprepException
.- Parameters:
cs
- the character sequence which should be transformed to aDomainpart
- Returns:
- the
Domainpart
if no exception occurs - Throws:
IllegalArgumentException
- if the given input is not a validDomainpart
- Since:
- 0.6.2
- See Also:
-
from
Get theDomainpart
representing the input String.- Parameters:
domain
- the input String.- Returns:
- the domainpart.
- Throws:
XmppStringprepException
- if an error occurs.
-
from
Get theDomainpart
representing the input String.- Parameters:
domain
- the input String.context
- the JXMPP context.- Returns:
- the domainpart.
- Throws:
XmppStringprepException
- if an error occurs.
-