Copies every mapping in the specified map to this map. @param map the map to copy mappings from. @throws UnsupportedOperationException if adding to this map is not supported. @throws ClassCastException if the class of a key or value is inappropriate for this
(Map<? extends K, ? extends V> map)
| 535 | * support {@code null} keys or values. |
| 536 | */ |
| 537 | public void putAll(Map<? extends K, ? extends V> map) { |
| 538 | Iterator it = map.entrySet().iterator(); |
| 539 | while (it.hasNext()) { |
| 540 | Map.Entry<? extends K, ? extends V> entry = (Map.Entry<? extends K, ? extends V>)it.next(); |
| 541 | put(entry.getKey(), entry.getValue()); |
| 542 | } |
| 543 | } |
| 544 | |
| 545 | /** |
| 546 | * Removes a mapping with the specified key from this Map. |