mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Improvements in entry creation and management.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1854 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
25e4481984
commit
dd4c10ac9d
2 changed files with 44 additions and 2 deletions
|
@ -104,6 +104,17 @@ public class Roster {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cretaes a new roster entry.
|
||||
*
|
||||
* @param user
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public RosterEntry createEntry(String user, String name) {
|
||||
return new RosterEntry(user, name, connection);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the roster group with the specified name, or <tt>null</tt> if the
|
||||
* group doesn't exist.
|
||||
|
@ -117,6 +128,17 @@ public class Roster {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of the groups in the roster.
|
||||
*
|
||||
* @return the number of groups in the roster.
|
||||
*/
|
||||
public int getGroupCount() {
|
||||
synchronized (groups) {
|
||||
return groups.size();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an iterator the for all the roster groups.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue