public class RosterGroup
extends org.jivesoftware.smack.Manager
Roster.getGroup(String)| Modifier and Type | Method and Description |
|---|---|
void |
addEntry(RosterEntry entry)
Adds a roster entry to this group.
|
boolean |
contains(RosterEntry entry)
Returns true if the specified entry is part of this group.
|
boolean |
contains(java.lang.String user)
Returns true if the specified XMPP address is an entry in this group.
|
java.util.List<RosterEntry> |
getEntries()
Returns an copied list of all entries in the group.
|
RosterEntry |
getEntry(java.lang.String user)
Returns the roster entry associated with the given XMPP address or
null if the user is not an entry in the group.
|
int |
getEntryCount()
Returns the number of entries in the group.
|
java.lang.String |
getName()
Returns the name of the group.
|
void |
removeEntry(RosterEntry entry)
Removes a roster entry from this group.
|
void |
setName(java.lang.String name)
Sets the name of the group.
|
public java.lang.String getName()
public void setName(java.lang.String name)
throws org.jivesoftware.smack.SmackException.NotConnectedException,
org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException
name - the name of the group.org.jivesoftware.smack.SmackException.NotConnectedExceptionorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionpublic int getEntryCount()
public java.util.List<RosterEntry> getEntries()
public RosterEntry getEntry(java.lang.String user)
user - the XMPP address of the user (eg "jsmith@example.com").public boolean contains(RosterEntry entry)
entry - a roster entry.public boolean contains(java.lang.String user)
user - the XMPP address of the user.public void addEntry(RosterEntry entry) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
entry - a roster entry.org.jivesoftware.smack.XMPPException.XMPPErrorException - if an error occured while trying to add the entry to the group.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionpublic void removeEntry(RosterEntry entry) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
entry - a roster entry.org.jivesoftware.smack.XMPPException.XMPPErrorException - if an error occurred while trying to remove the entry from the group.org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedException