Package org.jivesoftware.smackx.muc
Class Occupant
- java.lang.Object
-
- org.jivesoftware.smackx.muc.Occupant
-
public class Occupant extends java.lang.ObjectRepresents the information about an occupant in a given room. The information will always have the affiliation and role of the occupant in the room. The full JID and nickname are optional.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)MUCAffiliationgetAffiliation()Returns the affiliation of the occupant.org.jxmpp.jid.JidgetJid()Returns the full JID of the occupant.org.jxmpp.jid.parts.ResourcepartgetNick()Returns the current nickname of the occupant in the room.MUCRolegetRole()Returns the current role of the occupant in the room.inthashCode()
-
-
-
Method Detail
-
getJid
public org.jxmpp.jid.Jid getJid()
Returns the full JID of the occupant. If this information was extracted from a presence and the room is semi or full-anonymous then the answer will be null. On the other hand, if this information was obtained while maintaining the voice list or the moderator list then we will always have a full JID.- Returns:
- the full JID of the occupant.
-
getAffiliation
public MUCAffiliation getAffiliation()
Returns the affiliation of the occupant. Possible affiliations are: "owner", "admin", "member", "outcast". This information will always be available.- Returns:
- the affiliation of the occupant.
-
getRole
public MUCRole getRole()
Returns the current role of the occupant in the room. This information will always be available.- Returns:
- the current role of the occupant in the room.
-
getNick
public org.jxmpp.jid.parts.Resourcepart getNick()
Returns the current nickname of the occupant in the room. If this information was extracted from a presence then the answer will be null.- Returns:
- the current nickname of the occupant in the room or null if this information was obtained from a presence.
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-