Android Utililty Methods Collection to Map Convert

List of utility methods to do Collection to Map Convert

Description

The list of methods to do Collection to Map Convert are organized into topic(s).

Method

MapgetCardinalityMap(final Collection coll)
get Cardinality Map
Map count = new HashMap();
for (Iterator<?> it = coll.iterator(); it.hasNext();) {
    Object obj = it.next();
    Integer c = (Integer) (count.get(obj));
    if (c == null) {
        count.put(obj, INTEGER_ONE);
    } else {
        count.put(obj, new Integer(c.intValue() + 1));
...