Suppose I have a existing HashMap<Integer,Integer> map, and I do a map.put(1,3). Does the whole hashmap have to be stored? And will it therefore copy and restore the entire hashmap?

Or put another way suppose I have a graph

class Graph

HashMap<Integer,Integer> adjacencyMap

...

}

An insert of the graph will update the adjacenyMap. Does the entire map need to be stored?