org.xmpp.packet
Class Roster.Item

java.lang.Object
  extended by org.xmpp.packet.Roster.Item
Enclosing class:
Roster

public static class Roster.Item
extends java.lang.Object

Item in a roster, which represents an individual contact. Each contact has a JID, an optional nickname, a subscription type, and can belong to one ore more groups.


Method Summary
 Roster.Ask getAsk()
          Returns the ask state of this item.
 java.util.Collection<java.lang.String> getGroups()
          Returns a Collection of the groups defined in this item.
 JID getJID()
          Returns the JID associated with this item.
 java.lang.String getName()
          Returns the nickname associated with this item.
 Roster.Subscription getSubscription()
          Returns the subscription state of this item.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getJID

public JID getJID()
Returns the JID associated with this item. The JID is the "key" in the list of items that make up a roster. There can only be a single item per JID in a roster.

Returns:
the JID associated with this item.

getName

public java.lang.String getName()
Returns the nickname associated with this item. If no nickname exists, null is returned.

Returns:
the nickname, or null if it doesn't exist.

getAsk

public Roster.Ask getAsk()
Returns the ask state of this item.

Returns:
the ask state of this item.

getSubscription

public Roster.Subscription getSubscription()
Returns the subscription state of this item.

Returns:
the subscription state of this item.

getGroups

public java.util.Collection<java.lang.String> getGroups()
Returns a Collection of the groups defined in this item. If no groups are defined, an empty Collection is returned.

Returns:
the groups in this item.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009-2010 Ignite Realtime. All Rights Reserved.