public class Domainpart extends Part
You can create instances of this class from Strings using from(String)
.
Modifier and Type | Method and Description |
---|---|
static Domainpart |
from(String domain)
Get the
Domainpart representing the input String. |
static Domainpart |
fromOrNull(CharSequence cs)
|
static Domainpart |
fromOrThrowUnchecked(CharSequence cs)
Like
from(String) but does throw an unchecked IllegalArgumentException instead of a
XmppStringprepException . |
assertNotLongerThan1023BytesOrEmpty, charAt, equals, hashCode, intern, length, subSequence, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
chars, codePoints
public static Domainpart fromOrNull(CharSequence cs)
cs
- the input CharSequencenull
public static Domainpart 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 Domainpart
Domainpart
if no exception occursIllegalArgumentException
- if the given input is not a valid Domainpart
from(String)
public static Domainpart from(String domain) throws XmppStringprepException
Domainpart
representing the input String.domain
- the input String.XmppStringprepException
- if an error occurs.