public abstract class AbstractJid extends Object implements Jid
Constructor and Description |
---|
AbstractJid() |
Modifier and Type | Method and Description |
---|---|
char |
charAt(int index) |
<T extends Jid> |
downcast()
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.
|
String |
getLocalpartOrNull()
Get the localpart of this JID or null.
|
String |
getResourceOrNull()
Get the resourcepart of this JID or null.
|
int |
hashCode() |
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() |
CharSequence |
subSequence(int start,
int end) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
asBareJidIfPossible, asDomainBareJidIfPossible, asDomainFullJidIfPossible, asFullJidIfPossible, asUnescapedString, getDomain, isParentOf, isParentOf, isParentOf, isParentOf, toString
compareTo
chars, codePoints
public final boolean isBareOrFullJid()
isBareOrFullJid
in interface Jid
public final boolean isBareJid()
Jid
BareJid
.public final boolean isFullJid()
Jid
FullJid
.public final boolean isDomainBareJid()
Jid
DomainBareJid
.isDomainBareJid
in interface Jid
public final boolean isDomainFullJid()
Jid
DomainFullJid
.isDomainFullJid
in interface Jid
public abstract boolean hasNoResource()
Jid
BareJid
or DomainBareJid
.hasNoResource
in interface Jid
public final boolean hasResource()
hasResource
in interface Jid
public final boolean hasLocalpart()
hasLocalpart
in interface Jid
public final <T extends Jid> T downcast()
Jid
public int length()
length
in interface CharSequence
public char charAt(int index)
charAt
in interface CharSequence
public CharSequence subSequence(int start, int end)
subSequence
in interface CharSequence
public String getResourceOrNull()
Jid
If the JID is of form null
is returned.
getResourceOrNull
in interface Jid
public String getLocalpartOrNull()
Jid
If the JID is of form null
is returned.
getLocalpartOrNull
in interface Jid
public 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 Jid
jid
- the other JID to compare withpublic final boolean equals(CharSequence charSequence)
Jid
equals(charSequence.toString()
would
return true.equals
in interface Jid
charSequence
- the CharSequence to compare this JID with.equals(charSequence.toString()
would return true.Jid.equals(String)
Copyright © 2015 Ignite Realtime. All rights reserved.