public final class DomainAndResourcepartJid extends AbstractJid implements DomainFullJid
 Note that this implementation does not require an cache for the unescaped
 string, compared to LocalDomainAndResourcepartJid.
 
cache| Modifier and Type | Method and Description | 
|---|---|
BareJid | 
asBareJid()
Return a JID created by removing the Resourcepart from this JID. 
 | 
DomainBareJid | 
asDomainBareJid()
Convert this Jid to a  
DomainBareJid. | 
DomainFullJid | 
asDomainFullJidIfPossible()
Convert this Jid to a  
DomainFullJid if possible. | 
EntityBareJid | 
asEntityBareJidIfPossible()
Convert this Jid to a  
EntityBareJid if possible. | 
EntityFullJid | 
asEntityFullJidIfPossible()
Convert this Jid to a  
EntityFullJid if possible. | 
EntityJid | 
asEntityJidIfPossible()
Convert this Jid to a  
EntityJid if possible. | 
FullJid | 
asFullJidIfPossible()
Convert this Jid to a  
FullJid if possible. | 
String | 
asUnescapedString()
Return the unescaped String representation of this JID. 
 | 
Domainpart | 
getDomain()
Get the  
Domainpart of this Jid. | 
Localpart | 
getLocalpartOrNull()
Get the localpart of this JID or null. 
 | 
Resourcepart | 
getResourceOrNull()
Get the resourcepart of this JID or null. 
 | 
Resourcepart | 
getResourcepart()
Return the  
Resourcepart of this JID. | 
boolean | 
hasNoResource()
Check if this is an instance of  
EntityBareJid or DomainBareJid. | 
boolean | 
isParentOf(DomainBareJid domainBareJid)
See  
Jid.isParentOf(Jid). | 
boolean | 
isParentOf(DomainFullJid domainFullJid)
See  
Jid.isParentOf(Jid). | 
boolean | 
isParentOf(EntityBareJid bareJid)
See  
Jid.isParentOf(Jid). | 
boolean | 
isParentOf(EntityFullJid fullJid)
See  
Jid.isParentOf(Jid). | 
String | 
toString()
Returns the String representation of this JID. 
 | 
asDomainFullJidOrThrow, asEntityBareJidOrThrow, asEntityFullJidOrThrow, asEntityJidOrThrow, asFullJidOrThrow, charAt, compareTo, downcast, equals, equals, equals, getLocalpartOrThrow, getResourceOrEmpty, getResourceOrThrow, hashCode, hasLocalpart, hasResource, intern, isDomainBareJid, isDomainFullJid, isEntityBareJid, isEntityFullJid, isEntityJid, isParentOf, length, subSequenceclone, finalize, getClass, notify, notifyAll, wait, wait, waitasDomainFullJidOrThrow, asEntityBareJidOrThrow, asEntityFullJidOrThrow, asEntityJidOrThrow, asFullJidOrThrow, downcast, equals, equals, getLocalpartOrThrow, getResourceOrEmpty, getResourceOrThrow, hasLocalpart, hasResource, intern, isDomainBareJid, isDomainFullJid, isEntityBareJid, isEntityFullJid, isEntityJid, isParentOfcompareTocharAt, chars, codePoints, length, subSequencepublic String toString()
Jidpublic DomainBareJid asDomainBareJid()
JidDomainBareJid.
 Note that it is always possible to convert a Jid to a DomainBareJid, since every Jid has a domain part.
asDomainBareJid in interface Jidpublic boolean hasNoResource()
JidEntityBareJid or DomainBareJid.hasNoResource in interface JidhasNoResource in class AbstractJidpublic EntityBareJid asEntityBareJidIfPossible()
JidEntityBareJid if possible.asEntityBareJidIfPossible in interface JidEntityBareJid or null.public EntityFullJid asEntityFullJidIfPossible()
JidEntityFullJid if possible.asEntityFullJidIfPossible in interface JidEntityFullJid or null.public DomainFullJid asDomainFullJidIfPossible()
JidDomainFullJid if possible.asDomainFullJidIfPossible in interface Jidpublic Resourcepart getResourceOrNull()
Jid
 If the JID is of form <localpart@domain.example/resource> then this method returns 'resource'. If the JID no
 resourcepart, then null is returned.
 
getResourceOrNull in interface JidgetResourceOrNull in class AbstractJidpublic boolean isParentOf(EntityBareJid bareJid)
JidJid.isParentOf(Jid).isParentOf in interface JidbareJid - the bare JID.public boolean isParentOf(EntityFullJid fullJid)
JidJid.isParentOf(Jid).isParentOf in interface JidfullJid - the full JID.public boolean isParentOf(DomainBareJid domainBareJid)
JidJid.isParentOf(Jid).isParentOf in interface JiddomainBareJid - the domain bare JID.public boolean isParentOf(DomainFullJid domainFullJid)
JidJid.isParentOf(Jid).isParentOf in interface JiddomainFullJid - the domain full JID.public Resourcepart getResourcepart()
FullJidResourcepart of this JID.getResourcepart in interface FullJidpublic BareJid asBareJid()
Jidpublic Domainpart getDomain()
JidDomainpart of this Jid.public String asUnescapedString()
JidSince 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.
For example, if the users inputs'at&t guy@example.com', the escaped real JID created with
 JidCreate will be 'at\26t\20guy@example.com', which is what
 Jid.toString() will return. But Jid.asUnescapedString() will return again
 'at&t guy@example.com'.asUnescapedString in interface Jidpublic EntityJid asEntityJidIfPossible()
JidEntityJid if possible.asEntityJidIfPossible in interface JidEntityJid or null.public FullJid asFullJidIfPossible()
JidFullJid if possible.asFullJidIfPossible in interface JidFullJid or null.public Localpart getLocalpartOrNull()
Jid
 If the JID is of form <localpart@domain.example> then this method returns 'localpart'. If the JID has no
 localpart, then null is returned.
 
getLocalpartOrNull in interface JidgetLocalpartOrNull in class AbstractJid