public abstract class AbstractJid extends Object implements Jid
| Modifier and Type | Field and Description | 
|---|---|
protected String | 
cache
Cache for the String representation of this JID. 
 | 
| Constructor and Description | 
|---|
AbstractJid()  | 
| Modifier and Type | Method and Description | 
|---|---|
DomainFullJid | 
asDomainFullJidOrThrow()
Convert this Jid to a  
DomainFullJid or throw an IllegalStateException if this is not possible. | 
EntityBareJid | 
asEntityBareJidOrThrow()
Convert this Jid to a  
EntityBareJid or throw an IllegalStateException if this is not possible. | 
EntityFullJid | 
asEntityFullJidOrThrow()
Convert this Jid to a  
EntityFullJid or throw an IllegalStateException if this is not possible. | 
EntityJid | 
asEntityJidOrThrow()
Convert this Jid to a  
EntityJid or throw an IllegalStateException if this is not possible. | 
EntityFullJid | 
asFullJidOrThrow()
Convert this Jid to a  
FullJid or throw an IllegalStateException if this is not possible. | 
char | 
charAt(int index)  | 
int | 
compareTo(Jid other)  | 
<T extends Jid> | 
downcast(Class<T> jidClass)
Return the downcasted instance of this Jid. 
 | 
boolean | 
equals(CharSequence charSequence)
Compares the given CharSequence with this JID. 
 | 
boolean | 
equals(Object other)  | 
boolean | 
equals(String string)
Compares the given String wit this JID. 
 | 
abstract Localpart | 
getLocalpartOrNull()
Get the localpart of this JID or null. 
 | 
Localpart | 
getLocalpartOrThrow()
Get the localpart of this JID or throw an  
IllegalStateException. | 
Resourcepart | 
getResourceOrEmpty()
Get the resourcepart of this JID or return the empty resourcepart. 
 | 
abstract Resourcepart | 
getResourceOrNull()
Get the resourcepart of this JID or null. 
 | 
Resourcepart | 
getResourceOrThrow()
Get the resourcepart of this JID or throw an  
IllegalStateException. | 
int | 
hashCode()  | 
boolean | 
hasLocalpart()
Check if this is a Jid with a  
Localpart. | 
abstract boolean | 
hasNoResource()
Check if this is an instance of  
EntityBareJid or DomainBareJid. | 
boolean | 
hasResource()
Check if this is a Jid with a  
Resourcepart. | 
String | 
intern()
Returns the canonical String representation of this JID. 
 | 
boolean | 
isDomainBareJid()
Check if this is an instance of  
DomainBareJid. | 
boolean | 
isDomainFullJid()
Check if this is an instance of  
DomainFullJid. | 
boolean | 
isEntityBareJid()
Check if this is an instance of  
EntityBareJid. | 
boolean | 
isEntityFullJid()
Check if this is an instance of  
EntityFullJid. | 
boolean | 
isEntityJid()
Check if this is a  
EntityBareJid or EntityFullJid. | 
boolean | 
isParentOf(Jid jid)
Check if this JID is the parent of another JID. 
 | 
int | 
length()  | 
CharSequence | 
subSequence(int start,
           int end)  | 
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitasBareJid, asDomainBareJid, asDomainFullJidIfPossible, asEntityBareJidIfPossible, asEntityFullJidIfPossible, asEntityJidIfPossible, asFullJidIfPossible, asUnescapedString, getDomain, isParentOf, isParentOf, isParentOf, isParentOf, toStringchars, codePointspublic AbstractJid()
public final boolean isEntityJid()
JidEntityBareJid or EntityFullJid.isEntityJid in interface Jidpublic final boolean isEntityBareJid()
JidEntityBareJid.isEntityBareJid in interface Jidpublic final boolean isEntityFullJid()
JidEntityFullJid.isEntityFullJid in interface Jidpublic final boolean isDomainBareJid()
JidDomainBareJid.isDomainBareJid in interface Jidpublic final boolean isDomainFullJid()
JidDomainFullJid.isDomainFullJid in interface Jidpublic abstract boolean hasNoResource()
JidEntityBareJid or DomainBareJid.hasNoResource in interface Jidpublic final boolean hasResource()
JidResourcepart.hasResource in interface Jidpublic final boolean hasLocalpart()
JidLocalpart.hasLocalpart in interface Jidpublic final <T extends Jid> T downcast(Class<T> jidClass)
Jidpublic int length()
length in interface CharSequencepublic char charAt(int index)
charAt in interface CharSequencepublic CharSequence subSequence(int start, int end)
subSequence in interface CharSequencepublic final EntityBareJid asEntityBareJidOrThrow()
JidEntityBareJid or throw an IllegalStateException if this is not possible.asEntityBareJidOrThrow in interface JidEntityBareJid.public EntityFullJid asEntityFullJidOrThrow()
JidEntityFullJid or throw an IllegalStateException if this is not possible.asEntityFullJidOrThrow in interface JidEntityFullJid.public EntityJid asEntityJidOrThrow()
JidEntityJid or throw an IllegalStateException if this is not possible.asEntityJidOrThrow in interface JidEntityJid.public EntityFullJid asFullJidOrThrow()
JidFullJid or throw an IllegalStateException if this is not possible.asFullJidOrThrow in interface JidFullJid.public DomainFullJid asDomainFullJidOrThrow()
JidDomainFullJid or throw an IllegalStateException if this is not possible.asDomainFullJidOrThrow in interface JidDomainFullJid.public abstract 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 Jidpublic final Resourcepart getResourceOrEmpty()
Jid
 If the JID is of form <localpart@domain.example/resource> then this method returns 'resource'. If the JID no
 resourcepart, then Resourcepart.EMPTY is returned.
 
getResourceOrEmpty in interface Jidpublic final Resourcepart getResourceOrThrow()
JidIllegalStateException.
 
 If the JID is of form <localpart@domain.example/resource> then this method returns 'resource'. If the JID no
 resourcepart, then an IllegalStateException is thrown.
 
getResourceOrThrow in interface Jidpublic abstract 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 Jidpublic final Localpart getLocalpartOrThrow()
JidIllegalStateException.
 
 If the JID is of form <localpart@domain.example> then this method returns 'localpart'. If the JID has no
 localpart, then null is returned.
 
getLocalpartOrThrow 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 withpublic final boolean equals(CharSequence charSequence)
Jidequals(charSequence.toString() would
 return true.equals in interface JidcharSequence - the CharSequence to compare this JID with.equals(charSequence.toString() would return true.Jid.equals(String)public final boolean equals(String string)
Jid
 Returns true if toString().equals(string), that is if the String representation of this JID matches the given string.
 
public final int compareTo(Jid other)
compareTo in interface Comparable<Jid>