/** * Creates a deep copy of this HashNMap. * * @return a clone. * @throws CloneNotSupportedException this should never happen. */ public Object clone() throws CloneNotSupportedException { final HashNMap map = (HashNMap) super.clone(); map.table = new HashMap(); final Iterator iterator = keys(); while (iterator.hasNext()) { final Object key = iterator.next(); final List list = (List) map.table.get(key); if (list != null) { map.table.put(key, ObjectUtilities.clone(list)); } } return map; }
/** * Creates a deep copy of this HashNMap. * * @return a clone. * @throws CloneNotSupportedException this should never happen. */ public Object clone() throws CloneNotSupportedException { final HashNMap map = (HashNMap) super.clone(); map.table = new HashMap(); final Iterator iterator = keys(); while (iterator.hasNext()) { final Object key = iterator.next(); final List list = (List) map.table.get(key); if (list != null) { map.table.put(key, ObjectUtilities.clone(list)); } } return map; }
/** * Creates a deep copy of this HashNMap. * * @return a clone. * @throws CloneNotSupportedException this should never happen. */ public Object clone() throws CloneNotSupportedException { final HashNMap map = (HashNMap) super.clone(); map.table = new HashMap(); final Iterator iterator = keys(); while (iterator.hasNext()) { final Object key = iterator.next(); final List list = (List) map.table.get(key); if (list != null) { map.table.put(key, ObjectUtilities.clone(list)); } } return map; }
final Iterator keys = classMap.keys(); while (keys.hasNext()) { final Class base = (Class) keys.next();