Java Code Examples for java.util.WeakHashMap.putAll()

The following are Jave code examples for showing how to use putAll() of the java.util.WeakHashMap class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: monarch   File: CopyOnWriteWeakHashMap.java   View Source Code Vote up 4 votes
@Override
public synchronized void putAll(Map<? extends K, ? extends V> m) {
  WeakHashMap<K, V> tmp = new WeakHashMap<K, V>(map);
  tmp.putAll(m);
  map = Collections.unmodifiableMap(tmp);
}