Class Roster.Item

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

public static class Roster.Item extends 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 Details

    • 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 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 Collection<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 String toString()
      Overrides:
      toString in class Object