Commit 767fe716 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Renamed #sizeOfList to #sizeOfCollection to accept Collections and not only Lists.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@744 b35dd754-fafc-0310-a699-88a17e54d16e
parent b3a18c22
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
package org.jivesoftware.util; package org.jivesoftware.util;
import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Collection;
/** /**
* Utility class for determining the sizes in bytes of commonly used objects. * Utility class for determining the sizes in bytes of commonly used objects.
...@@ -127,13 +127,13 @@ public class CacheSizes { ...@@ -127,13 +127,13 @@ public class CacheSizes {
} }
/** /**
* Returns the size in bytes of a List object. Elements are assumed to be * Returns the size in bytes of a Collection object. Elements are assumed to be
* <tt>String</tt>s, <tt>Long</tt>s or <tt>Cacheable</tt> objects. * <tt>String</tt>s, <tt>Long</tt>s or <tt>Cacheable</tt> objects.
* *
* @param list the List object to determine the size of. * @param list the Collection object to determine the size of.
* @return the size of the List object. * @return the size of the Collection object.
*/ */
public static int sizeOfList(List list) { public static int sizeOfCollection(Collection list) {
if (list == null) { if (list == null) {
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment