Smack

org.jivesoftware.smack
Class RosterEntry

java.lang.Object
  extended by org.jivesoftware.smack.RosterEntry

public class RosterEntry
extends Object

Each user in your roster is represented by a roster entry, which contains the user's JID and a name or nickname you assign.

Author:
Matt Tucker

Method Summary
 boolean equals(Object object)
           
 Collection<RosterGroup> getGroups()
          Returns an unmodifiable collection of the roster groups that this entry belongs to.
 String getName()
          Returns the name associated with this entry.
 RosterPacket.ItemStatus getStatus()
          Returns the roster subscription status of the entry.
 RosterPacket.ItemType getType()
          Returns the roster subscription type of the entry.
 String getUser()
          Returns the JID of the user associated with this entry.
 void setName(String name)
          Sets the name associated with this entry.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getUser

public String getUser()
Returns the JID of the user associated with this entry.

Returns:
the user associated with this entry.

getName

public String getName()
Returns the name associated with this entry.

Returns:
the name.

setName

public void setName(String name)
Sets the name associated with this entry.

Parameters:
name - the name.

getGroups

public Collection<RosterGroup> getGroups()
Returns an unmodifiable collection of the roster groups that this entry belongs to.

Returns:
an iterator for the groups this entry belongs to.

getType

public RosterPacket.ItemType getType()
Returns the roster subscription type of the entry. When the type is RosterPacket.ItemType.none or RosterPacket.ItemType.from, refer to getStatus() to see if a subscription request is pending.

Returns:
the type.

getStatus

public RosterPacket.ItemStatus getStatus()
Returns the roster subscription status of the entry. When the status is RosterPacket.ItemStatus.SUBSCRIPTION_PENDING, the contact has to answer the subscription request.

Returns:
the status.

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object object)
Overrides:
equals in class Object

Smack

Copyright © 2003-2007 Jive Software.