List of utility methods to do Collection to Map Convert
Map,?> | getCardinalityMap(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)); ... |