@ Override public void putAll ( final Map < ? extends K , ? extends V > map ) { int mapSize = map . size ( ) ; if ( size ( ) == 0 && mapSize != 0 && map instanceof SortedMap ) { Comparator < ? > c = ( ( SortedMap < ? extends K , ? extends V > ) map ) . comparator ( ) ; if ( c == comparator || ( c != null && c . equals ( comparator ) ) ) { ++ modCount ; try { buildFromSorted ( mapSize , map . entrySet ( ) . iterator ( ) , null , null ) ; } catch ( java . io . IOException cannotHappen ) { } catch ( ClassNotFoundException cannotHappen ) { } return ; } } super . putAll ( map ) ; }
Copies all of the mappings from the specified map to this map . These mappings replace any mappings that this map had for any of the keys currently in the specified map .