public abstract class AbstractJid extends java.lang.Object implements Jid
| Constructor and Description |
|---|
AbstractJid() |
| Modifier and Type | Method and Description |
|---|---|
char |
charAt(int index) |
<T extends AbstractJid> |
downcast()
Return the downcasted instance of this Jid.
|
java.lang.String |
getLocalpartOrNull()
Get the localpart of this JID or null.
|
java.lang.String |
getResourceOrNull()
Get the resourcepart of this JID or null.
|
boolean |
hasLocalpart() |
abstract boolean |
hasNoResource()
Check if this is an instance of
BareJid or DomainBareJid. |
boolean |
hasResource() |
boolean |
isBareJid()
Check if this is an instance of
BareJid. |
boolean |
isBareOrFullJid() |
boolean |
isDomainBareJid()
Check if this is an instance of
DomainBareJid. |
boolean |
isDomainFullJid()
Check if this is an instance of
DomainFullJid. |
boolean |
isFullJid()
Check if this is an instance of
FullJid. |
boolean |
isParentOf(Jid jid)
Check if this JID is the parent of another JID.
|
int |
length() |
java.lang.CharSequence |
subSequence(int start,
int end) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasBareJidIfPossible, asDomainBareJidIfPossible, asDomainFullJidIfPossible, asFullJidIfPossible, asUnescapedString, getDomain, isParentOf, isParentOf, isParentOf, isParentOf, toStringpublic final boolean isBareOrFullJid()
isBareOrFullJid in interface Jidpublic final boolean isBareJid()
JidBareJid.public final boolean isFullJid()
JidFullJid.public final boolean isDomainBareJid()
JidDomainBareJid.isDomainBareJid in interface Jidpublic final boolean isDomainFullJid()
JidDomainFullJid.isDomainFullJid in interface Jidpublic abstract boolean hasNoResource()
JidBareJid or DomainBareJid.hasNoResource in interface Jidpublic final boolean hasResource()
hasResource in interface Jidpublic final boolean hasLocalpart()
hasLocalpart in interface Jidpublic final <T extends AbstractJid> T downcast()
Jidpublic int length()
length in interface java.lang.CharSequencepublic char charAt(int index)
charAt in interface java.lang.CharSequencepublic java.lang.CharSequence subSequence(int start,
int end)
subSequence in interface java.lang.CharSequencepublic java.lang.String getResourceOrNull()
Jid
If the JID is of form null is returned.
getResourceOrNull in interface Jidpublic java.lang.String getLocalpartOrNull()
Jid
If the JID is of form null is returned.
getLocalpartOrNull in interface Jidpublic final boolean isParentOf(Jid jid)
Jid
| this JID (parentOf) | other JID | result | |---------------------+---------------------+--------| | dom.example | dom.example | true | | dom.example | dom.example/res | true | | dom.example | loc@dom.example | true | | dom.example | loc@dom.example/res | true | | dom.example/res | dom.exmple | false | | dom.example/res | dom.example/res | true | | dom.example/res | loc@dom.example | false | | dom.example/res | loc@dom.example/res | false | | loc@dom.example | dom.example | false | | loc@dom.example | dom.example/res | false | | loc@dom.example | loc@dom.example | true | | loc@dom.example | loc@dom.example/res | true | | loc@dom.example/res | dom.example | false | | loc@dom.example/res | dom.example/res | false | | loc@dom.example/res | loc@dom.example | false | | loc@dom.example/res | loc@dom.example/res | true |
isParentOf in interface Jidjid - the other JID to compare with