public class QBRosterGroup
extends java.lang.Object
QBRoster.getGroup(String)
Constructor and Description |
---|
QBRosterGroup(RosterGroup rosterGroup) |
Modifier and Type | Method and Description |
---|---|
void |
addEntry(QBRosterEntry entry)
Adds a roster entry to this group.
|
boolean |
contains(int userId)
Returns true if the specified user ID is an entry in this group.
|
boolean |
contains(QBRosterEntry entry)
Returns true if the specified entry is part of this group.
|
java.util.Collection<QBRosterEntry> |
getEntries()
Returns an unmodifiable collection of all entries in the group.
|
QBRosterEntry |
getEntry(int userId)
Returns the roster entry associated with the given user ID 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(QBRosterEntry 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 SmackException.NotConnectedException, XMPPException.XMPPErrorException, SmackException.NoResponseException
name
- The name to set.SmackException.NotConnectedException
XMPPException.XMPPErrorException
SmackException.NoResponseException
public int getEntryCount()
public java.util.Collection<QBRosterEntry> getEntries()
public QBRosterEntry getEntry(int userId)
userId
- The ID of a user.public boolean contains(QBRosterEntry entry)
entry
- a roster entry.public boolean contains(int userId)
userId
- The ID of a user.public void addEntry(QBRosterEntry entry) throws XMPPException, SmackException.NotConnectedException, SmackException.NoResponseException
entry
- a roster entry.XMPPException
- if an error occured while trying to add the entry to the group.SmackException.NotConnectedException
SmackException.NoResponseException
- if there was no response from the server.public void removeEntry(QBRosterEntry entry) throws XMPPException, SmackException.NotConnectedException, SmackException.NoResponseException
entry
- a roster entry.XMPPException
- if an error occurred while trying to remove the entry from the group.SmackException.NotConnectedException
SmackException.NoResponseException
- if there was no response from the server.