コード例 #1
0
 /**
  * Copies all of the mappings from the specified map to this one.
  *
  * <p>These mappings replace any mappings that this map had for any of the keys currently in the
  * specified Map.
  *
  * @param t Mappings to be stored in this map.
  */
 public void putAll(Map<? extends K, ? extends V> t) {
   for (Iterator<? extends Map.Entry<? extends K, ? extends V>> it =
           (Iterator<? extends Map.Entry<? extends K, ? extends V>>) t.entrySet().iterator();
       it.hasNext(); ) {
     Entry<? extends K, ? extends V> e = it.next();
     put(e.getKey(), e.getValue());
   }
 }
コード例 #2
0
 public SimpleEntry(Entry<K, V> e) {
   this.key = e.getKey();
   this.value = e.getValue();
 }