/** * @return a new set instance merging all keys contained in the child and parent maps. <strong>The returned set is not backed by the maps.</strong> * Any references to the returned sets are hold at the holder's own risks. This breaks the general {@link java.util.Map#entrySet()} contract. */ public Set keySet() { HashSet s = new HashSet(child.keySet()); if (parent != null) s.addAll(parent.keySet()); return s; } }
public int size() { return keySet().size(); }
for (Object key : cm.keySet()) { snapshotMap.put(key, cm.get(key));