public class Resourcepart extends Part
You can create instances of this class from Strings using from(String).
| Modifier and Type | Field and Description |
|---|---|
static Resourcepart |
EMPTY
The empty resource part.
|
| Modifier and Type | Method and Description |
|---|---|
static Resourcepart |
from(java.lang.String resource)
Get the
Resourcepart representing the input String. |
static Resourcepart |
fromOrThrowUnchecked(java.lang.CharSequence cs)
Like
from(String) but does throw an unchecked IllegalArgumentException instead of a
XmppStringprepException. |
assertNotLongerThan1023BytesOrEmpty, charAt, equals, hashCode, intern, length, subSequence, toStringpublic static final Resourcepart EMPTY
This empty resource part is the part that is represented by the empty String. This is useful in cases where you
have a collection of Resourceparts that does not allow null values, but you want to deal with the
"no resource" case.
public static Resourcepart fromOrThrowUnchecked(java.lang.CharSequence cs)
from(String) but does throw an unchecked IllegalArgumentException instead of a
XmppStringprepException.cs - the character sequence which should be transformed to a ResourcepartResourcepart if no exception occursjava.lang.IllegalArgumentException - if the given input is not a valid Resourcepartfrom(String)public static Resourcepart from(java.lang.String resource) throws org.jxmpp.stringprep.XmppStringprepException
Resourcepart representing the input String.resource - the input String.org.jxmpp.stringprep.XmppStringprepException - if an error occurs.