public static class DiscoverInfo.Identity extends Object implements Comparable<DiscoverInfo.Identity>, Cloneable
Refer to Jabber::Registrar in order to get the official registry of values for the category and type attributes.
Constructor and Description |
---|
DiscoverInfo.Identity(DiscoverInfo.Identity identity) |
DiscoverInfo.Identity(String category,
String name,
String type)
Creates a new identity for an XMPP entity.
|
Modifier and Type | Method and Description |
---|---|
DiscoverInfo.Identity |
clone() |
int |
compareTo(DiscoverInfo.Identity other)
Compares this identity with another one.
|
boolean |
equals(Object obj)
Check equality for Identity for category, type, lang and name
in that order as defined by
XEP-0015 5.4 Processing Method (Step 3.3)
|
String |
getCategory()
Returns the entity's category.
|
String |
getLanguage()
Returns the identities natural language if one is set
|
String |
getName()
Returns the identity's name.
|
String |
getType()
Returns the entity's type.
|
int |
hashCode() |
void |
setLanguage(String lang)
Sets the natural language (xml:lang) for this identity (optional)
|
void |
setName(String name)
Set the identity's name.
|
XmlStringBuilder |
toXML() |
public DiscoverInfo.Identity(DiscoverInfo.Identity identity)
public DiscoverInfo.Identity(String category, String name, String type)
category
- the entity's category (required as per XEP-30).name
- the entity's name.type
- the entity's type (required as per XEP-30).public String getCategory()
public String getType()
public void setLanguage(String lang)
lang
- the xml:lang of this Identitypublic String getLanguage()
public XmlStringBuilder toXML()
public boolean equals(Object obj)
public int compareTo(DiscoverInfo.Identity other)
compareTo
in interface Comparable<DiscoverInfo.Identity>
other
- public DiscoverInfo.Identity clone()