/** * Puts all entries of a map into this map, forward direction. * * @param m The map. */ public void putAll(Map<? extends K, ? extends V> m) { for (Map.Entry<? extends K, ? extends V> entry : m.entrySet()) { put(entry.getKey(), entry.getValue()); } }
/** * Puts all entries of a map into this map, reverse direction. * * @param m The map. */ public void rputAll(Map<? extends V, ? extends K> m) { for (Map.Entry<? extends V, ? extends K> entry : m.entrySet()) { put(entry.getValue(), entry.getKey()); } }