From 8053f0bb9218e7846dddcbe52e4e544591284a17 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Mon, 16 Jun 2003 03:33:37 +0000 Subject: [PATCH] Added method to get the count of roster items. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1956 b35dd754-fafc-0310-a699-88a17e54d16e --- .../org/jivesoftware/smack/packet/RosterPacket.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/org/jivesoftware/smack/packet/RosterPacket.java b/source/org/jivesoftware/smack/packet/RosterPacket.java index 144fa45cc..bebc6e8fd 100644 --- a/source/org/jivesoftware/smack/packet/RosterPacket.java +++ b/source/org/jivesoftware/smack/packet/RosterPacket.java @@ -74,6 +74,17 @@ public class RosterPacket extends IQ { } } + /** + * Returns the number of roster items in this roster packet. + * + * @return the number of roster items. + */ + public int getRosterItemCount() { + synchronized (rosterItems) { + return rosterItems.size(); + } + } + /** * Returns an Iterator for the roster items in the packet. *