public static class DiscoverInfo.Identity extends java.lang.Object implements java.lang.Comparable<DiscoverInfo.Identity>, TypedCloneable<DiscoverInfo.Identity>
Refer to Jabber::Registrar in order to get the official registry of values for the category and type attributes.
Constructor and Description |
---|
Identity(DiscoverInfo.Identity identity) |
Identity(java.lang.String category,
java.lang.String type)
Creates a new identity for an XMPP entity.
|
Identity(java.lang.String category,
java.lang.String name,
java.lang.String type)
Creates a new identity for an XMPP entity.
|
Identity(java.lang.String category,
java.lang.String type,
java.lang.String name,
java.lang.String lang)
Creates a new identity for an XMPP entity.
|
Modifier and Type | Method and Description |
---|---|
DiscoverInfo.Identity |
clone()
Clone this instance.
|
int |
compareTo(DiscoverInfo.Identity other)
Compares this identity with another one.
|
boolean |
equals(java.lang.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).
|
java.lang.String |
getCategory()
Returns the entity's category.
|
java.lang.String |
getLanguage()
Returns the identities natural language if one is set.
|
java.lang.String |
getName()
Returns the identity's name.
|
java.lang.String |
getType()
Returns the entity's type.
|
int |
hashCode() |
boolean |
isOfCategoryAndType(java.lang.String category,
java.lang.String type)
Returns true if this identity is of the given category and type.
|
XmlStringBuilder |
toXML() |
public Identity(DiscoverInfo.Identity identity)
public Identity(java.lang.String category, java.lang.String type)
category
- the entity's category (required as per XEP-30).type
- the entity's type (required as per XEP-30).public Identity(java.lang.String category, java.lang.String name, java.lang.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 Identity(java.lang.String category, java.lang.String type, java.lang.String name, java.lang.String lang)
category
- the entity's category (required as per XEP-30).type
- the entity's type (required as per XEP-30).name
- the entity's name.lang
- the entity's lang.public java.lang.String getCategory()
public java.lang.String getName()
public java.lang.String getType()
public java.lang.String getLanguage()
public boolean isOfCategoryAndType(java.lang.String category, java.lang.String type)
category
- the category.type
- the type.public XmlStringBuilder toXML()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int compareTo(DiscoverInfo.Identity other)
compareTo
in interface java.lang.Comparable<DiscoverInfo.Identity>
other
- public DiscoverInfo.Identity clone()
TypedCloneable
clone
in interface TypedCloneable<DiscoverInfo.Identity>
clone
in class java.lang.Object